JAVA Internal
JAVA Internal
Total Questions: 26
Duration:
Q1. The standard input/output stream in java is presented by which of the following fields of the
System class
a) In
b) out
c) sys
d) err
( Book = Guide to advance java , Session = Input / Output Stream , Topic
=stream Classes
= Annotations,
Topic =Annotation
Classes
Q11. ___________ exceptions arise due to the errors present in the APIs.
a) Programming errors
b) Client code errors
c) Errors beyond the control of a program.
Q12. __________________ literals are enclosed in a single quotes.
a) Character
b) String
c) Floating point
Q13. _____________ consists of sequence of characters enclosed in double quotes.
a) String literals
b) Null literals
c) Character literals
Q14. The primitive datatype _________ represents symbols in a character set like letters and numbers.
a) byte
b) char
c) short
d) long
Q15: Which of the following statements stating the characteristics of Deque are true?
a) Is a double ended queue allowing insertion and deletion of elements from both ends
b) Can be implemented only as queue
c) Deque defines only free size deques
d) Deque defines two forms of methods.
Q16. Java provides some statements that will change the flow of control based on conditions.
__________ statement stops the execution of the innermost loop in the program and starts processing
the next line of code after the block.
a) break
b) continue
c) change
d) jump
Q17. The ____________ statement causes the current iteration of the innermost loop to cease and the
next iteration of the same loop to start.
a) continue
b) break
c) end
d) cease
Q18. ________________ usually tests the loop control variable against a targeted value in a FOR
statement.
a) Boolean expression
b) Initialization expression
c) Iteration expression
Q20. What is known as a base case?
a) Stopping recursion to save the memory
b) Calling a recursive method
c) Creating actual objects
d) Assigning values to elements
Q21. Every recursive method has some characteristics. When the method calls itself and pushes
values on the stack, then this phase is known as ____________
a) Endless recursion
b) Recursive depth
c) Stack overflow
d) Winding
Q22. What will be the result of trying to compile and run the expression (int)(Math.random()*4)?
a) A negative number might be returned.
b) The number 0 might be returned.
c) The number 4 is returned
d) The probability that the number 0, 1, 2, or 3 might be returned is equal.
Q23. Which expression will extract the substring cas from the string defined by the String str =
cacaso,
a) Str.substring(2,3)
b) Str.substring(2,2)
c) Str.substring(2,5)
d) Str.substring(3,2)
Q24. Which of the following class is associated with the primitive data type float?
a) Float
b) Integer
c) Character
d) All of above
Q25. ________________ calculates the absolute value of the int, long, float, or double value passed to it
as argument.
a) abs()
b) ceil()
a) floor()
b) min()
Q26. The OjectOutputSteam class serializes Java objects.
a) TRUE
b) FALSE