TCS iON
10+ HUREO Interview Questions and Answers
Primitive data types in Java are basic data types that are not objects.
Primitive data types include int, double, float, char, boolean, byte, short, and long.
Examples: int num = 10; double price = 19.99; char letter = 'A'; boolean flag = true;
Java is considered object-oriented because it supports the four main principles of OOP: encapsulation, inheritance, polymorphism, and abstraction.
Java allows for the creation of classes and objects, which encapsulate data and behavior together.
Inheritance is supported in Java, allowing classes to inherit attributes and methods from other classes.
Polymorphism in Java allows objects to be treated as instances of their parent class, enabling flexibility in programming.
Abstractio...read more
Q3. Just in time . Which used in java program excusion
Just-in-time (JIT) is a feature in Java that compiles bytecode into native machine code at runtime.
JIT improves the performance of Java programs by reducing the time needed for compilation.
JIT is enabled by default in most Java virtual machines.
JIT can be disabled using the -Xint option.
JIT can also be configured using various options such as -XX:CompileThreshold and -XX:MaxInlineLevel.
Q4. What is the difference between hashmap and hashset
HashMap is a key-value pair collection while HashSet is a collection of unique elements.
HashMap stores key-value pairs while HashSet stores unique elements.
HashMap allows duplicate values but keys must be unique, while HashSet does not allow duplicates.
HashMap uses keys to retrieve values, while HashSet does not have keys and values are the same.
Example: HashMap
map = new HashMap<>(); HashSet set = new HashSet<>();
JVM stands for Java Virtual Machine, it is an abstract computing machine that enables a computer to run Java programs.
JVM is responsible for converting Java bytecode into machine code that can be executed by the computer's processor.
It provides a platform-independent execution environment for Java programs.
JVM manages memory, handles garbage collection, and provides security features for Java applications.
Examples of JVM implementations include Oracle HotSpot, OpenJ9, and Gra...read more
JIT stands for Just-In-Time compiler in Java, which compiles Java bytecode into native machine code at runtime.
JIT compiler improves the performance of Java applications by compiling bytecode into native machine code on-the-fly.
It identifies and optimizes frequently executed code paths, resulting in faster execution.
JIT compiler is a part of Java Virtual Machine (JVM) and helps in achieving high performance without the need for manual intervention.
Example: When a Java program...read more
Q7. What is a wrapper class in java
Wrapper classes in Java are classes that allow primitive data types to be accessed as objects.
Wrapper classes provide a way to convert primitive data types into objects.
They are used when an object is required, such as in collections or generics.
Examples include Integer for int, Double for double, Boolean for boolean, etc.
Q8. What is the usage of optinal class
Optional class is used to handle null values in Java, preventing NullPointerExceptions.
Optional class was introduced in Java 8 to provide a more elegant way of handling null values.
It encourages developers to explicitly handle the presence or absence of a value, rather than relying on null checks.
Optional class has methods like isPresent(), get(), orElse(), etc. to work with optional values.
Using Optional class can make code more readable and less error-prone.
Example: Optiona...read more
Q9. Why the java object oriented
Java is object-oriented to promote code reusability, modularity, and maintainability.
Java's object-oriented approach allows for the creation of reusable code components called objects.
Objects encapsulate data and behavior, making it easier to manage and maintain code.
Inheritance enables the creation of hierarchies and promotes code reuse.
Polymorphism allows objects of different classes to be treated as objects of a common superclass.
Abstraction and encapsulation help in hidin...read more
Q10. What are premitive data types
Primitive data types are basic data types provided by Java, such as int, double, boolean, char, etc.
Primitive data types are predefined by the language and not objects
They are used to store simple values directly in memory
They have a fixed size and do not have any methods
Examples include int for integers, double for floating-point numbers, boolean for true/false values, char for characters
Q11. What is jit and explain
JIT stands for Just-In-Time compiler. It is a part of the Java Virtual Machine (JVM) that compiles bytecode into machine code at runtime.
JIT is responsible for improving the performance of Java applications by compiling frequently executed code into native machine code.
It analyzes the code at runtime and identifies the hotspots, i.e., the code that is executed frequently.
JIT compiles the hotspots into machine code and stores them in the code cache for future use.
This process ...read more
Q12. Oops concept in c++ programming language
OOPs concepts in C++ include inheritance, polymorphism, encapsulation, and abstraction.
Inheritance allows a class to inherit properties and methods from another class.
Polymorphism allows objects to take on multiple forms.
Encapsulation hides the implementation details of a class from other objects.
Abstraction focuses on the essential features of an object and hides the unnecessary details.
Example: A car class can inherit properties from a vehicle class, and a sports car object...read more
Q13. What is jvm
JVM stands for Java Virtual Machine. It is a virtual machine that executes Java bytecode.
JVM is responsible for running Java programs by interpreting bytecode.
It provides platform independence by executing bytecode on different operating systems.
JVM manages memory, performs garbage collection, and optimizes code execution.
It consists of various components like class loader, bytecode verifier, interpreter, and just-in-time compiler.
Examples of JVM implementations include Oracl...read more
Q14. Explain stream api and lambda expression
Stream API is a set of classes in Java that allow processing collections of objects in a functional style. Lambda expressions are used to write concise code for functional interfaces.
Stream API provides a way to perform operations on collections like filter, map, reduce, etc.
Lambda expressions are used to define anonymous functions in a concise way.
Example: List
names = Arrays.asList("Alice", "Bob", "Charlie"); names.stream().filter(name -> name.startsWith("A")).forEach(Syste...read more
Q15. Encapsulation with an example?
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit.
Encapsulation helps in hiding the internal state of an object and restricting access to it.
It allows for better control over the data by preventing external code from directly modifying it.
Example: A class 'Car' with private variables like 'model', 'year', and public methods like 'getYear()' and 'setModel()'.
Q16. what is OPPS concept
OPPS stands for Object-Oriented Programming System. It is a programming paradigm that uses objects to represent real-world entities.
OPPS focuses on the concept of objects and classes.
It emphasizes encapsulation, inheritance, and polymorphism.
Objects have attributes (data) and behaviors (methods).
Classes are blueprints for creating objects.
Encapsulation hides the internal details of an object.
Inheritance allows classes to inherit properties and methods from other classes.
Polym...read more
Q17. Oops concept in java
Oops concept in java
Object-oriented programming paradigm
Encapsulation, Inheritance, Polymorphism, Abstraction
Classes and Objects
Access Modifiers
Interfaces and Abstract Classes
Interview Process at HUREO
Top Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month