Top 20 Java Interview Questions | Top 20 Core Java Interview Question Series | Part 2
Top 20 Java Interview Question | Core Java Interview Question Series | Part 2
This is the second part of the Core Java interview questions. In this article, we will discuss the next 20 JAVA interview questions. For the first 20 Java interview questions please Click Here. This will be very helpful for both freshers and experienced individuals. Hope you like this initiation!
If you enjoyed this article, please share it with your friends and support us.
Q.21 What is WORA architecture?
Ans. WORA stands for write once run anywhere. It means we can execute it on any kind of platform that has JVM on it. Java supports WORA architecture.
Q.22 What is the class file?
Ans. The file which is generated by the JAVA compiler after successful compilation of source file and which is having .class as an extension. It is also known as intermediate file or byte code file.
Q.23 What is byte code?
Ans. Byte code is present inside the class file or intermediate file or byte code file which is neither understandable by programmer nor by machine. Only JVM can understand this.
Q.24 What is compilation?
Ans. The process of converting the JAVA source file into intermediate file is known as compilation.
Q.25 What is execution?
Ans. The process of converting intermediate file into machine understandable language is called execution or run the program.
Q.26 What are the types of error?
Ans. We have three types of error 1). Compile time error 2). Run time Error 3). Logical error
Note: Software testing jobs service
Q.27 What is compile time error?
Ans. At the time of compilation, if there is any syntax mistake in the programm, we are getting some error then it is called compile time error.
Q.28 What is syntax?
Ans. The rules & grammer we are using in programming language is known as syntax
Q.29 What is run time error?
Ans. At the time of execution , if we getting the error because of lack execution resource, is known as run time error. It is also known as execution time error Ex divide by zero
Q.30 What is logical error?
Ans. In this scenario, we are not getting compile time error or run time error. we will get the output but the output will not match with the expected output. ex we have to write a program to add 5 & 7, after writting the program it is compile time successful as well as run time successful and we are getting out as 35. It is a logical error as expected output is 12.
Q.31 What is JDK?
Ans. JDK stands for JAVA development kit. It is a package which consist of JAVA development tools like Java compiler (JAVAC) and JRE( Java run time environment) for execution.
Q.32 What is JRE?
Ans. JRE stands for JAVA run time environment. It is an environment which consist of JVM ( JAVA virtual machine) and built in class files which is required for the execution of JAVA programm.
Q.33 What is JVM
Ans. JVM stands for JAVA Virtual machine, It helps to convert byte code into current system understandable language ( low level language) with the help of interpreter and JIT compiler.
Q.34 What is JIT compiler?
Ans. JIT stands for Just in time compiler. It is an integral part of JVM. It helps to improve the performance of JAVA programms by compiling byte code at run time. It increases execution performance many times over the previous level.
Q.35 What is file structure in window?
Ans. In window, hard disk is divided into multiple portions. Each portion is known as drive. Drive is represented by drive name followed by colun. Ex. C drive, Ddrive etc.
Q.36 What is user home directory?
Ans. The directory which is created with the help of user name inside the user directory of a c drive is known as user home directory. As soon as we are going to open the command prompt, we are always inside user home directory.
Q.37 What is current home directory?
Ans. The folder/directory which is currently in used is known as current working directory.
Q.38 What is path?
Ans. Path is a medium with which we can travel from one directory to another directory.
Q.39 What is command prompt?
Ans. It is the one of the user interface to give the instruction to the machine by giving the command. It is also known as command user interface/ CMD
Q.40 What are the important commands for CMD?
Ans. Below are the important commands for CMD
- dir: It is used to display the content of the current directory
- cls: Used to clear the screen of Command user interface.
- mkdir or md: It is used to create new folder or directory Ex md f1
- rmdir or rd: It is used to remove the folder. Ex. rd f1.
- rename or ren: It is used to rename the folder. Ex. rename old_name new_name
- cd: It is used to change the directory. If you want to move in forward direction, we should pass directory name as input. Ex cd next. If you want to move in backward direction, you should pass the dot dot (..) as input. ex. cd ..
- javac: It is used to compile the java source file. we should pass the source file name as an input to this command including the extension. ex. javac rajat.java
- Java: It is used to execute te java class file. We should pass only class file as an input to this command without any extension. EX. Java rajat
For more details Join our Whatsup Group :Â Whatup Group
To get daily job updates on software testing:Â To get Daily Job updates, click me
9050358180
Post a Comment