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. | |
18. | What are the types of data types in Java? |
---|---|
|
|
19. | What are the supported platforms by Java Programming Languages? |
---|---|
Java runs on a variety of platforms, such as
|
|
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. | |