Asite Solutions
10+ Emke Group Interview Questions and Answers
Q1. What is java? What is oops? Difference between hashmap and hashset
Java is a high-level programming language known for its portability and object-oriented programming support. OOPs stands for Object-Oriented Programming. HashMap and HashSet are both data structures in Java, but HashMap is used to store key-value pairs while HashSet is used to store unique elements.
Java is a high-level programming language used for developing applications and software.
OOPs (Object-Oriented Programming) is a programming paradigm based on the concept of objects...read more
Q2. Can we use try block without catch block?
Yes, we can use try block without catch block to handle exceptions using finally block.
Try block can be used without catch block if there is a finally block to handle exceptions.
Finally block is executed whether an exception is thrown or not.
Example: try { // code that may throw exception } finally { // code to be executed regardless of exception }
Q3. 2. How to define Thread in java?
Thread in Java is a lightweight sub-process that executes a set of instructions independently.
Thread can be defined by extending the Thread class or implementing the Runnable interface.
Thread class provides various methods to control the execution of threads like start(), sleep(), join(), etc.
Runnable interface has only one method run() which needs to be implemented.
Threads can be created and started using the start() method.
Example: public class MyThread extends Thread { pub...read more
Q4. 5. How do you connect database with Java ?
Java provides JDBC API to connect with databases.
Load the JDBC driver class
Create a connection object
Create a statement object
Execute the query
Process the result set
Q5. 6. What is Checked and Unchecked exception?
Checked exceptions are checked at compile-time while unchecked exceptions are not checked at compile-time.
Checked exceptions are those which are checked at compile-time and the programmer is forced to handle them using try-catch or throws keyword.
Unchecked exceptions are those which are not checked at compile-time and the programmer is not forced to handle them.
Examples of checked exceptions are IOException, ClassNotFoundException, SQLException, etc.
Examples of unchecked exce...read more
Q6. 1. What is collection ?
A collection is a framework that provides an architecture to store and manipulate a group of objects.
Collections are used to store, retrieve, manipulate, and communicate data between objects.
They provide various data structures like lists, sets, and maps.
Collections offer methods to add, remove, and search for elements in the collection.
Examples of collections in Java include ArrayList, HashSet, and HashMap.
Q7. What is collection framework?
Collection framework in Java is a set of classes and interfaces that provide a way to store and manipulate groups of objects.
Collection framework provides interfaces like List, Set, and Map for storing and manipulating groups of objects.
It includes classes like ArrayList, LinkedList, HashSet, and HashMap that implement these interfaces.
Collections in Java provide methods for adding, removing, and accessing elements in a collection.
It allows for easy iteration over elements us...read more
Q8. 7. Why we use throw and throws ?
throw is used to explicitly throw an exception while throws is used to declare the exception that a method may throw.
throw is used to handle exceptional situations in the code
throws is used to declare the exceptions that a method may throw
throw is followed by an instance of an exception class
throws is followed by the list of exceptions that a method may throw
throw is used inside a method
throws is used in the method signature
Q9. 3. What is Servlets and JSP?
Servlets and JSP are Java technologies used for web development.
Servlets are Java classes that handle HTTP requests and responses.
JSP (JavaServer Pages) are HTML pages with embedded Java code.
Servlets and JSP work together to create dynamic web pages.
Servlets are faster than JSP as they directly generate HTML.
JSP is easier to use for web designers as it allows them to focus on HTML and CSS.
Q10. Explain encapsulation and it's uses
Encapsulation is the concept of bundling data and methods that operate on the data into a single unit, known as a class.
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 direct access and manipulation.
Encapsulation also helps in achieving data abstraction, where the internal details of an object are hidden and only the necessary information is exposed.
By using access modifiers li...read more
Q11. 4. What is Polymorphism?
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It can be achieved through method overloading and method overriding.
Example: A parent class Animal can have child classes like Dog, Cat, and Cow. All these child classes can have their own implementation of the method 'makeSound', but they can be called using the same method name from the parent class.
Polymorphism helps...read more
Q12. What is OOPS in java?
OOPS stands for Object-Oriented Programming System in Java.
OOPS is a programming paradigm that uses objects to represent real-world entities.
It focuses on encapsulation, inheritance, and polymorphism.
Encapsulation is the process of hiding data and methods within a class.
Inheritance allows a subclass to inherit properties and methods from a superclass.
Polymorphism allows objects to take on multiple forms or behaviors.
Example: A car object can have properties like make, model, ...read more
Q13. What is Polymorphism?
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects of different classes to be treated as if they are of the same class.
It can be achieved through method overloading or method overriding.
Example: A parent class Animal can have child classes like Dog, Cat, and Cow. All these child classes can have their own implementation of the method 'makeSound', but they can be treated as Animal objects.
Polymorphism helps in achieving code reusability ...read more
Interview Process at Emke Group
Top Java Developer Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month