Basic Java Interview Question and Answers

45. What is a Java Keyword?
  The keyword in Java is a special name used before a class or method or variable or statement in Java programs which specifies the nature or type of accessibility of that particular class, or method or variable. There are 48 reserved keywords currently defined in Java.
  • abstract
  • boolean
  • break
  • byte
  • case
  • catch
  • char
  • class
  • const
  • continue
  • default
  • do
  • double
  • else
  • extends
  • final
  • finally
  • float
  • for
  • goto
  • if
  • implements
  • import
  • instanceof
  • int
  • interface
  • long
  • native
  • new
  • package
  • private
  • protected
  • public
  • return
  • short
  • static
  • strictfp
  • super
  • switch
  • synchronized<
  • this
  • throw
  • throws
  • transient
  • Error! Not a valid link
  • void
  • Error! Not a valid link.
  • while
Your Name Your Email-ID
Your Answer
46. What is a White space in Java?
  In Java, white space is a space between character/operator, a tab or new line.
Your Name Your Email-ID
Your Answer
47. What is auto boxing and unboxing?
  Auto boxing is the process in which primitive type is automatically boxed in to equivalent type wrapper. There is no need to explicitly do casting for the same.
Auto boxing is versa of the same. Valued of the boxed object is converted in to primitive data type.
Your Name Your Email-ID
Your Answer
48. How does Java handle integer overflows and underflows?
  It uses those low order bytes of the result that can fit into the size of the type allowed by the operation.
Your Name Your Email-ID
Your Answer