-
Use of Static
What is the use of static in (public static void main string args[])
-
Which of the following methods defined in Thread class are static?
a) sleep()
b) join()
c) start()
d) yield() -
-
_________ is a feature that allows one interface to be used for a general class of actions.
A) EncapsulationB) ClassC) InheritenceD) Polymorphism
-
What are the main differences between Java and C++?
Everything is an object in Java (Single root hierarchy as everything gets derived from java.lang.Object). Java does not have all the complicated aspects of C++ ( For ex: Pointers, templates, unions, operator overloading, structures etc..) The Java language promoters initially said "No pointers!", but when many programmers questioned how you can work without pointers, the promoters began saying "Restricted...
-
Which of the following declare an array of string objects? (Select Multiple)
A) String[ ] s;B) String [ ]s:C) String[ s]:D) String s[ ]:
-
When you read your e-mail, you are viewing _________ data
A) ActiveB) PassiveC) BothD) None of the above
-
Dynamic method Dispatch
What is dynamic method dispatch?
-
-
Mention 5 basic difference between Array List and Vector in Java Colletion FrameWork.
Vector is unsynchronized wheras ArrayList is synchronized.
-
Java is Architectural _____________
A) DependentB) NeutralC) IndependentD) None of the above
-
_____________ is the process by which one object acquires the properties of another object
A) EncapsulationB) ClassC) InheritenceD) Polymorphism
-
When to use Interface over abstract class?
Abstract Classes: Classes which cannot be instantiated. This means one cannot make a object of this class or in other way cannot create object by saying ClassAbs abs = new ClassAbs(); where ClassAbs is abstract class.Abstarct classes contains have one or more abstarct methods, ie method body only no implementation.Interfaces: These are same as abstract classes only difference is we an only define...
-
What is the difference between an if statement and a switch statement
The if statement is used to select among two alternatives. It uses a boolean expression todecide which alternative should be executed. The switch statement is used to select among multiple alternatives. It uses an int expression to determine which alternativeshould be executed.
-
-
Is null a keyword
The null value is not a keyword.
-
-
Which of the following is not a wrapper class?
A) StringB) IntegerC) BooleanD) Character
-
-
Java Interview Questions
Ans