Pages

Self Test Skills

1. Who is known as father of Java Programming Language ?
A.James Gosling (Answer)
B.M. P Java
C.Charel Babbage
D.Blais Pascal


2. In java control statements break, continue, return, try-catch-finally and assert belongs to ?
A.Selection statements
B.Loop Statements
C.Transfer statements. (Answer)
D.Pause Statement


3. Which provides runtime environment for java byte code to be executed ?
A.JDK
B.JVM (Answer)
C.JRE
D.JAVAC


4. What is byte code in Java ?
A.Code generated by a Java compiler. (Answer)
B.Code generated by a Java Virtual Machine
C.Name of Java source code file
D.Block of code written inside a class


5. Which of the following are not Java keywords ?
A.double
B.switch
C.then (Answer)
D.instanceof


6. Which of these have highest precedence ?
A.() (Answer)
B.++
C.*
D.>>


7. Which of these is returned by operator '&' ?
A.Integer
B.Character (Answer)
C.Boolean
D.Float


8. Data type long literals are appended by
A.Uppercase L
B.Lowercase L
C.Long
D.Both A and B (Answer)


9. Which variables are created when an object is created with the use of the keyword 'new' and destroyed when the object is destroyed ?
A.Local variables
B.Instance variables (Answer)
C.Class Variables
D.Static variables


10. Java language was initially called as
A.Sumatra
B.J++
C.Oak (Answer)
D.Pine


11. What is garbage collection in the context of Java ?
A.Java deletes all unused java files on the system.
B.Memory used by the object with no reference is automatically reclaimed. (Answer)
C.The JVM cleans output of Java program with error.
D.Any unused package in a program automatically gets deleted.


12. Which one is a template for creating different objects ?
A.An Array
B.A class (Answer)
C.Interface
D.Method


13. Which symbol is used to contain the values of automatically initialized arrays ?
A.Brackets
B.Braces (Answer)
C.Parentheses
D.Comma


14. Which one is true about a constructor ?
A.A constructor must have the same name as the class it is declared within.
B.A constructor is used to create objects.
C.A constructor may be declared private.
D.All of the above (Answer)


15. Which of these operators is used to allocate memory to array variable in Java ?
A.alloc
B.malloc
C.new malloc
D.new (Answer)


16. Which of these is not a bitwise operator ?
A. &' Operator
B. &=' Operator
C. |=' Operator
D. <=’ Operator Answer)


17. Which of these is returned by Greater Than, Less Than and Equal To (i.e Relational) operator ?
A.Fload
B.Integer
C.Boolean (Answer)
D.Double


18. Which statement transfer execution to different parts of your code based on the value of an expression ?
A.If
B.Switch (Answer)
C.Nested If
D.If Else If


19. Modulus operator (%) can be applied to which of these ?
A.Integers
B.Floating - point numbers
C.Both A and B (Answer)
D.None of These


20. What feature of OOP has a super-class sub-class concept ?
A.Hierarchical inheritance (Answer)
B.Single inheritance
C.Multiple inheritances
D.Multilevel inheritance


21. Which of the following are not the methods of the Thread class ?
A.yield()
B.sleep(long msec)
C.go() (Answer)
D.stop()


22. Division operator has ____ precedence over multiplication operator
A.Heighest
B.Least
C.Equal (Answer)
D.None of These


23. What is the full form of JVM ?
A.Java Very Large Machine
B.Java Verified Machine
C.Java Very Small Machine
D.Java Virtual Machine (Answer)


24. In Java code, the line that begins with /* and ends with */ is known as?
A.Multiline comment (Answer)
B.Single line comment
C.Both A and B
D.None of these


25. Which of the following are not Java modifiers ?
A.public
B.private
C.friendly (Answer)
D.transient