Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 240
  • Last Modified:

Where i can get faqs?

Hi,

I want to practice some core java questions, not basic questions, questions like..

1. can we define a variable in interface?
2. How you can sort user defined objects in a specified manner in collection?

so, please provide the URL, where can i get this kind of questions?
0
haneef_nb
Asked:
haneef_nb
1 Solution
 
for_yanCommented:
In addition to the above links, these are direct short answers to your questions:

1) Interfaces can and are often used for defining static variables

2) In order to sort user defined objects in the collection you need to override
int compareTo(Object) method and define it in a way which corresponds to
your preference in object ordering. Then Collections.sort(ArrayList) method
will order your obejects as you wish


0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
haneef_nbAuthor Commented:
Thanks......
0
 
Sathish David Kumar NCommented:
Is that single exprt link only help you to achive your answer ?
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now