Core Java interview questionsDownload Core Java interview questions PDF
Core Java interview questions
- “For loop”: – for executing a statement or a set of statements for a given number of times, for loops are used. It is used when the programmer knows the number of times a statement is to be executed.
- “While loop”: – in this, a particular statement or set of statements are executed until a particular condition is fulfilled. In this, before the execution of statements, the condition is checked. It is known as an entry controlled loop.
- “Do While loop”: – there is only one difference between the while and do while loop and that is- in do while loop, the condition is checked after the execution of the block of statements. It is known as an exit controlled loop.
- Java is easy to use, whereas Python is very good in this case.
- The speed of coding in Java is average, whereas in Python it is excellent.
- In Java, the data types are statically typed, whereas in python the data types are dynamically typed.
- Java is average in the case of data sciences and machine learning applications, whereas data science and machine learning applications are majorly based on python. Python is very good in this case.
Call by value:
A process in which the values of the actual parameters sent by the calling function are copied to the formal parameters of the called function.
Call by reference:
A process in which the parameters of a calling function are passed to the parameters of the called function using an address.
Thread scheduler maintains threading states by using primitive and time slicing scheduling. It schedules the tasks by setting priority and time. Only one thread can run at a time in a single process by thread scheduler. When the highest priority is set to a process, the first process at highest priority gets starts before coming into dead or waiting state, after that the next process in the waiting state comes and make it task done and so on. This is how the thread scheduler schedules the task.
Overriding concept in java means when there are two methods with the same signature, one is in the parent class and the other one is in the child class. The override annotation can be used in the child class overridden method.
JVM (Java Virtual Machine):
Java virtual machine is actually an abstract machine which provides a runtime environment in which the java bytecode gets executed. A JVM performs some main tasks such as- loading, verifying and executing the code. It also provides a runtime environment.
JRE (Java Runtime Environment):
The Java runtime environment is used to provide a runtime environment. It is implemented by JVM. It consists of certain libraries which are used by JVM at runtime.
JDK (Java Development Kit):
The Java development kit consists of JRE and all the development tools which are necessary for compiling a program.
Related Interview Questions
Kotlin Interview Questions
Core Java interview questions
Vaadin interview questions
Scala interview questions
Maven interview questions
OpenXava Interview questions
Java Play interview Questions
Groovy interview questions
Hibernate Interview Questions
Java Grails Interview Questions
Apache Ant Interview questions
Apache Kafka Interview Questions
Gradle Interview Questions
JSF Interview Questions
JSP Interview Questions
JUnit Interview Questions
Spring interview questions
Struts interview questions
Spring Boot Interview questions
Servlet interview questions
JDBC interview questions
Subscribe Our NewsLetter
Never Miss an Articles from us.
- Common Interview Questions
- Python Flask Interview Questions
- NoSQL interview questions
- JQuery Interview Questions
- C programming interview questions
- AngularJS Interview Questions
- Express and Node JS Interview Questions
- Core Java interview questions
- HTML Interview Questions
- Laravel interview questions
- Wordpress Interview Questions
- Core PHP Interview Questions