Short Question 2 mark each:-
Que-1 (a) What is final keyword?
The final keyword in java is used to restrict the user. The java final keyword can be used in many context. Final can be:
declaration final int keyword=90;
Que 1 (b)- What do you mean by byte code?
Java bytecode is the instruction set for the Java Virtual Machine. It acts similar to an assembler which is an alias representation of a C++ code. As soon as a java program is compiled, java bytecode is generated. In more apt terms, 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
Que 1 (c)-What do you mean by finally keyword?
Finally is used to place important code, it will be executed whether exception is handled or not.
We are working with JDBC where connection should be close and we have close every connection where it need to close i run my code connection open but in between it run time exception occurred and compilation failed and connection remains open but if we close connection in finally block it will always execute no matter compliation failed or succed.
That’s the beauty of finally block.
It always takes place after try catch block.
Que 1 (d)-What is use of delete keyword?
Que 1 (e)- What are runtime exception?
Run Time Exception is an exception which occurred after successful compilation.
Some different type of run time Exception are written below:-
Que 1 (f) What is extends?
The extends keyword indicates that you are making a new class that derives from an existing class. The meaning of “extends” is to increase the functionality of child class.
Que 1(g) What is command line argument?
The java command-line argument is an argument that is passed at the time of running the java program.
The arguments passed from the console can be received in the java program and it can be used as an input.
Que 1 (h) What is Static Variable?
If you declare any variable as static, it is known as a static variable.
The static variable can be used to refer to the common property of all objects (which is not unique for each object), for example, the company name of employees, college name of students, etc.
How to declare a static variable:-
static String name=”YOUR_NAME”;