Java Link

See which of your colleagues or former colleagues are already on Java Link: Check out the Contact Finder
News »Browse Articles » Core java Interview Questions
0
Vote Vote

Core java Interview Questions

Views 4 Views    Comments 0 Comments    Share Share    Posted 08-09-2009  
Why is the main method static
So that it can be invoked without creating an instance of that class
What is the difference between class variable, member variable and automatic(local) variable
class variable is a static variable and does not belong to instance of class but rather shared across all the instances
member variable belongs to a particular instance of class and can be called from any method of the class
automatic or local variable is created on entry to a method and has only method scope
When are static and non static variables of the class initialized
The static variables are initialized when the class is loadedNon static variables are initialized just before the constructor is called
When are automatic variable initialized
Automatic variable have to be initialized explicitly
What is a modulo operator %
This operator gives the value which is related to the remainder of a divisione.g x=7%4 gives remainder 3 as an answer
How is an argument passed in java, by copy or by reference
What is a modulo operator %
This operator gives the value which is related to the remainder of a divisione.g x=7%4 gives remainder 3 as an answer
What is garbage collection
The runtime system keeps track of the memory that is allocated and is able to determine whether that memory is still useable. This work is usually done in background by a low-priority thread that is referred to as garbage collector. When the gc finds memory that is no longer accessible from any live thread it takes steps to release it back to the heap for reuse

Source:
http://www.j2eebrain.com/java-J2ee-category/interview-questions-faqs/core-java-q
0
Vote  Vote
Enter your comment:
No Comments For This News

Search News

What's the News?

Post a link to something interesting from another site, or submit your own original writing for the Java community to read.

Most Popular News

Most Recent User Submitted News