-
-
What is the range of the char type?
A) long - 0 lB) float - 0.0 fC) double - 0.0 dD) char – null
-
State true or false :- Can a double value be cast to a byte?
A) TrueB) False
-
-
-
When might your program wish to run the garbage collecter? (Select multiple)
A) before it enters a compute-intense section of codeB) before it enters a memory-intense section of codeC) before objects are finalizedD) when it knows there will be some idle time
-
What is an example of polymorphism?
A) Inner classB) Anonymous classesC) Method overloadingD) Method overriding
-
What are the advantages of inheritance? (Select multiple)
A) Reusability of codeB) accessibility of variables of the superclass by subclasses.C) Accessibility of methods of the superclass by subclasses.D) a,b are true
-
An interface contains __ methods
A) Non-abstractB) ImplementedC) unimplemented
-
What is the use of valueOf( ) method?
A) It converts data from its internal format into a human-readable form.B) It converts integer value to stringC) It converts string to int valueD) None of the above
-
Which of the following are true?
A) The Void class extends the Class class.B) The Float class extends the Double class.C) The System class extends the Runtime class.D) The Integer class extends the Number class.
-
Which of the following statements are true?
A) UTF characters are all 8-bits.B) UTF characters are all 16-bits.C) UTF characters are all 24-bits.D) Unicode characters are all 16-bits.
-
Which of the following are correct?
A) 128 >> 1 gives 64B) 128 >>> 1 gives 64C) 128 >> 1 gives -64D) 128 >>> 1 gives -64
-
Enum is a Keyword in Java, introduced from J2SE 5
A) TrueB) False
-
All of Swing's text components inherit from the same superclass
Skill/Topic: AWT & AppletsA) TrueB) False
-
Extending a class is the way Java inherits methods and variables from a parent class.
Skill/Topic: AWT & AppletsA) TrueB) False
-
Classes can implement methods and contain variables that are not constants
Skill/Topic: AWT & AppletsA) TrueB) False
-
________ enhance performance and functionality in various programming languages
Skill/Topic: AWT & AppletsA) threadsB) constantsC) variablesD) none of the above
-
-
Java Interview Questions
Ans