header

Java Interview Questions


HomeComputer Science⇒ Java Interview Questions

Q16. HotJava Browser was developed in the year
(a) 1990
(b) 1992
(c) 1995
(d) 1996

Q17. Which of the following is a multi line comment syntax
(a) begin with / and end with /
(b) begin with /* and end with */
(c) begin with # and end with #
(d) begin with /@ and end with @/

Q18. Which of the following is a single line comment syntax
(a) / comment
(b) // comment
(c) /* comment */
(d) //* comment */

Q19. Which one is not a java access modifiers
(a) Private
(b) Default
(c) Protected
(d) Abstract



Q20. Access modifier which is accessible only within class is called
(a) Private
(b) Default
(c) Protected
(d) Public

Q21. The protected access modifier is accessible within package and outside the package but through __________ only
(a) Encasulation
(b) Abstraction
(c) Inheritance
(d) Polymorphism

Q22. The protected access modifier can be applied on
(a) Members
(b) Class
(c) Method
(d) Interface

Q23. Which one is a correct if statement
(a) if{condition} (statement)
(b) if condition {statement}
(c) if(condition) {statement}
(d) if{condition} statement

Q24. A loop in java ends with
(a) Colon
(b) Semicolon
(c) Dot
(d) Slash

Q25. Exit for loop is an example of
(a) Do while loop
(b) While loop
(c) For loop
(d) None of the above



Q26. Which one loop is also known as Entry Control loop
(a) Infinite loop
(b) Do while loop
(c) For loop
(d) While loop

Q27. The range of Short is
(a) –27,568 to 27,567
(b) –30,453 to 30,453
(c) –32,768 to 32,767
(d) –34,563 to 34,563

Q28. A Signed 64-bit type is named as
(a) Byte
(b) Short
(c) Int
(d) Long

Q29. Float has _____ bits of storage
(a) 16
(b) 32
(c) 64
(d) 128

Q30. The range of floating point is
(a) -128 to +127
(b) 1.4e–045 to 3.4e+038
(c) -2147483648 to + 2147483647
(d) -32768 to + 32767


1 2 3 4 5 6 7






Enter Email Address for Newsletter



    Share on facebook    Share on twitter    Share on google +