Previous | Home | Next |
Exploring Java.lang
(a). True
(b). False
Answer: (a). True
Answer: Cloneable, Comparable and Runnable.
Answer:
- MAX_VALUE,
- MIN_VALUE,
- NaN ,
- POSITIVE_INFINITY,
- NEGATIVE_INFINITY and
- TYPE.
Answer:
- MAX_VALUE,
- MIN_VALUE,and
- TYPE.
Answer:
- MAX_RADIX,
- MIN_RADIX,
- MAX_VALUE,
- MIN_VALUE and
- TYPE.
Answer: The purpose of the Runtime class is to provide access to the Java runtime system.
Answer: The purpose of the System class is to provide access to system resources.
Answer: Object class is extended by all other classes.
Answer: The Class class can be used to obtain information about an object’s design.
Answer: abs( ) method.
Answer: E is the base of the natural logarithm and PI is the mathematical value pi.
(a). System
(b). SecurityManager
(c). Math
(d). Runtime
Answer: (a). System
(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.
Answer:
(c). The Class class can be used to load other classes.
(d). The ClassLoader class can be used to load other classes.
(a). absolute( )
(b). log( )
(c). cosine( )
(d). sine( )
Answer: (b). log( )
(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.
Answer: (a). Both classes extend Throwable.
(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.
Answer: (d). The Integer class extends the Number class.
(a). System.out.println(Math.floor(-4.7));
(b). System.out.println(Math.round(-4.7));
(c). System.out.println(Math.ceil(-4.7));
(d). System.out.println(Math.Min(-4.7));
Answer: (c). System.out.println(Math.ceil(-4.7));
(a). public class MyCalc extends Math
(b). Math.max(s);
(c). Math.round(9.99,1);
(d). Math.mod(4,10);
(e). None of the above.
Answer: (e). None of the above.
Integer ten=new Integer(10); Long nine=new Long (9); System.out.println(ten + nine); int i=1; System.out.println(i + ten);
(a). 19 followed by 20
(b). 19 followed by 11
(c). Error: Can't convert java lang Integer
(d). 10 followed by 1
Answer: (c). Error: Can't convert java lang Integer
Previous | Home | Next |