filmov
tv
infosys java interview questions core java interview questions

Показать описание
sure! preparing for a java interview, especially with a company like infosys, requires a good grasp of core java concepts. below is a compilation of some key core java interview questions, along with explanations and code examples.
1. **what are the main features of java?**
java is known for its key features, including:
- **platform independence:** write once, run anywhere (wora) due to the java virtual machine (jvm).
- **object-oriented:** supports object-oriented programming principles like inheritance, encapsulation, and polymorphism.
- **automatic memory management:** java has a built-in garbage collector that automatically manages memory.
- **multithreading:** java supports concurrent execution of two or more threads.
- **rich standard library:** java has a comprehensive api for various functionalities.
2. **explain the concept of oop in java.**
java is an object-oriented programming language that uses the following principles:
- **class:** a blueprint for creating objects.
- **object:** an instance of a class.
- **inheritance:** mechanism to acquire properties and behaviors of another class.
- **encapsulation:** bundling the data (attributes) and methods (functions) that operate on the data into a single unit or class.
- **polymorphism:** ability to take many forms, typically achieved through method overloading and overriding.
example of oop concepts
```java
// base class
class animal {
void sound() {
}
}
// derived class
class dog extends animal {
void sound() {
}
}
public class main {
public static void main(string[] args) {
animal mydog = new dog(); // polymorphism
}
}
```
3. **what is the difference between `==` and `equals()` in java?**
- `==` compares the references (memory addresses) of two objects.
- `equals()` compares the actual content of the objects.
example
```ja ...
#InfosysInterview #JavaInterviewQuestions #CoreJava
selenium core
selenium core maven dependency
selenium core concepts
selenium core and valence electrons
selenium core components
selenium core charge
selenium core java
selenium core electrons
selenium core java interview questions
selenium core functionality
selenium 30 side effects
selenium infosys
selenium infosys interview questions
infosys selenium certification answers
selenium framework examples
selenium interview questions and answers
selenium interview coding questions
selenium interview questions
1. **what are the main features of java?**
java is known for its key features, including:
- **platform independence:** write once, run anywhere (wora) due to the java virtual machine (jvm).
- **object-oriented:** supports object-oriented programming principles like inheritance, encapsulation, and polymorphism.
- **automatic memory management:** java has a built-in garbage collector that automatically manages memory.
- **multithreading:** java supports concurrent execution of two or more threads.
- **rich standard library:** java has a comprehensive api for various functionalities.
2. **explain the concept of oop in java.**
java is an object-oriented programming language that uses the following principles:
- **class:** a blueprint for creating objects.
- **object:** an instance of a class.
- **inheritance:** mechanism to acquire properties and behaviors of another class.
- **encapsulation:** bundling the data (attributes) and methods (functions) that operate on the data into a single unit or class.
- **polymorphism:** ability to take many forms, typically achieved through method overloading and overriding.
example of oop concepts
```java
// base class
class animal {
void sound() {
}
}
// derived class
class dog extends animal {
void sound() {
}
}
public class main {
public static void main(string[] args) {
animal mydog = new dog(); // polymorphism
}
}
```
3. **what is the difference between `==` and `equals()` in java?**
- `==` compares the references (memory addresses) of two objects.
- `equals()` compares the actual content of the objects.
example
```ja ...
#InfosysInterview #JavaInterviewQuestions #CoreJava
selenium core
selenium core maven dependency
selenium core concepts
selenium core and valence electrons
selenium core components
selenium core charge
selenium core java
selenium core electrons
selenium core java interview questions
selenium core functionality
selenium 30 side effects
selenium infosys
selenium infosys interview questions
infosys selenium certification answers
selenium framework examples
selenium interview questions and answers
selenium interview coding questions
selenium interview questions