Content-Length: 3104252 | pFad | https://www.scribd.com/document/528860290/java-mst-lab-viva-questions
7Java MST Lab Viva Questions
Java MST Lab Viva Questions
Java MST Lab Viva Questions
JRE
The Java Runtime Environment is a set of software tools which are used for
developing Java applications.
It physically exists. It contains a set of libraries + other files that JVM uses at
runtime.
JDK
JDK is an acronym for Java Development Kit. The Java Development Kit (JDK) is
a software development environment which is used to develop Java applications
and applets. It physically exists. It contains JRE + development tools.
The JDK contains a private Java Virtual Machine (JVM) and a few other resources
such as an interpreter/loader (java), a compiler (javac), an archiver (jar), a
documentation generator (Javadoc), etc. to complete the development of a Java
Application.
1. Modifiers: A class can be public or has default access (Refer this for
details).
2. class keyword: class keyword is used to create a class.
3. Class name: The name should begin with an initial letter (capitalized by
convention).
4. Superclass(if any): The name of the class’s parent (superclass), if any,
preceded by the keyword extends. A class can only extend (subclass) one
parent.
5. Interfaces(if any): A comma-separated list of interfaces implemented by the
class, if any, preceded by the keyword implements. A class can implement
more than one interface.
6. Body: The class body surrounded by braces, { }.
Object
1. Static methods: A static method is a method that can be called and executed
without creating an object. In general, static methods are used to create instance
methods.
Static method can be invoked directly via class name i.e.; we don't have to create
an object for a class in order to initiate static method.
2. Instance methods: These methods act upon the instance variables of a class.
Instance methods are being invoked with
a. Accessor methods: These are the methods which read the instance variables
i.e.; just go access the instance variables data. Generally these methods are named
by prefixing with "get".
b. Mutator method: These are the methods, which not only read the instance
variables but also modify the data. Generally these methods are named by
prefixing with "set".
· Single Inheritance
· Hierarchical Inheritance
Java bytecode is the instruction set for the Java Virtual Machine. As soon as
a Java program is compiled, Java bytecode is generated.
Java bytecode is the machine code in the form of a. class file.
With the help of Java bytecode we achieve platform independence in Java.
Why Java is robust language explain?
Java is robust because: It uses strong memory management. it is capable of
handling run-time errors, supports automatic garbage collection and exception
handling, and avoids explicit pointer concept. Java has a strong memory
management system. It helps in eliminating errors as it checks the code during
both compile and runtime.
Java Package:
Fetched URL: https://www.scribd.com/document/528860290/java-mst-lab-viva-questions
Alternative Proxies: