Professional Documents
Culture Documents
Answer:
Encapsulation – is binding variables and methods under single entity.
Inheritance – is acquiring the properties of one class to another class.
Polymorphism – is the ability of an object to take on many forms.
6. What are the kinds of variables in Java? What are their uses?
Answer:
Numeric variables - holds numbers or digits and can be used for mathematical computations.
Textual data - holds text, such as letters of the alphabet, and other characters
Boolean data - holds a value of true or false
9. What is an array?
Answer:
Arrays are used to store a collection of data, but it may be useful to think of an array as a
collection of variables that are all of the same type.
17. On successful compilation a file with the class extension is created. Why?
Answer:
After the file compile, a byte code file will be generated with an extension .class file as executable file.
18. Java compiler stores the .class files in the path specified in CLASSPATH environmental
variable? Why?
Answer:
Because CLASSPATH is an environment variable which is used by Application Class Loader to locate
and load the .class files.