-
Which of the following is not a wrapper class?
A) StringB) IntegerC) BooleanD) Character
-
What modifiers may be used with an inner class that is a member of an outer class
A (non-local) inner class may be declared as public, protected, private, static, final, orabstract.
-
-
-
Java was conceived by __________
A) MicrosoftB) OracleC) Sun MicrosystemD) Intel
-
Without main Method
How can we use method without using main method in JAVA?
-
Which of the following are true? (Select multiple)
A) The Class class is the superclass of the Object class.B) The Object class is final.C) The Class class can be used to load other classes.D) The ClassLoader class can be used to load other classes.
-
Which of the following statements accurately describe the use of access modifiers within a class definition? (Select multiple)
A) They can be applied to both data & methodsB) They must precede a class's data variables or methodsC) They can follow a class's data variables or methodsD) They can appear in any orderE) They must be applied to data variables first and then to methods
-
What is the data type for the parameter of the sleep() method?
A) doubleB) intC) longD) float
-
-
Which of the following types of class members can be part of the internal part of a class? (Select multiple)
A) Public instance variablesB) Private instance variablesC) Public methodsD) Private methods
-
Which of the following can you perform using the File class? (Select multiple)
A) Change the current directoryB) Return the name of the parent directoryC) Delete a fileD) Find if a file contains text or binary information
-
-
Which of the following are true about the Error and Exception classes?
A) Both classes extend Throwable.B) The Error class is final and the Exception class is not.C) The Exception class is final and the Error is not.D) Both classes implement Throwable.
-
Which of the following features are common to both Java & C++? (Select multiple)
A) The class declarationB) The access modifiersC) The encapsulation of data & methods with in objectsD) The use of pointers
-
Which of the following statements correctly describes an interface?
A) It's a concrete classB) It's a superclassC) It's a type of abstract class
-
When you read your e-mail, you are viewing _________ data
A) ActiveB) PassiveC) BothD) None of the above
-
-
_____________ is the process by which one object acquires the properties of another object
A) EncapsulationB) ClassC) InheritenceD) Polymorphism
-
You would use the ____ operator to create a single instance of a named class.
A) newB) dotC) equalsD) none of the above
Java Interview Questions
Ans