Basic Java Interview Question and Answers

17. Why are there no global variables in java?
  Global variables are considered bad form for a variety of reasons: adding state variables breaks referential transparency, state variables lessen the cohesion of a program.
 
Your Name Your Email-ID
Your Answer
18. What are the types of data types in Java?
 
  • Byte
  • Short
  • Int
  • Float
  • Long
  • Double
  • Char and
  • Boolean.
 
Your Name Your Email-ID
Your Answer
19. What are the supported platforms by Java Programming Languages?
  Java runs on a variety of platforms, such as
  • Windows
  • Mac OS and
The various versions of UNIX/Linux like
  • HP-Unix
  • Sun Solaris
  • Redhat Linux
  • Ubuntu
  • CentOS etc.
 
Your Name Your Email-ID
Your Answer
20. What is Dynamic Method Dispatch?
  Dynamic method dispatch is the mechanism by which a call to an overridden function is resolved at run time, rather than at compile time.
 
Your Name Your Email-ID
Your Answer