PCS-Global
10+ Kanwar Enterprises Interview Questions and Answers
Q1. What is class, object, abstraction, encapsulation in Java. Give real time example all of these.
Class, object, abstraction, encapsulation are fundamental concepts in Java programming.
Class is a blueprint for creating objects that defines its properties and methods.
Object is an instance of a class that has its own state and behavior.
Abstraction is the process of hiding implementation details and showing only essential features.
Encapsulation is the mechanism of wrapping data and code together into a single unit.
Example: A class 'Car' can have properties like 'make', 'mode...read more
Q2. What is your weak point and strong point?
My strong point is problem-solving and my weak point is public speaking.
Strong point: I enjoy breaking down complex problems and finding solutions.
Weak point: I get nervous when speaking in front of large groups.
Example for strong point: In my previous internship, I was able to identify and fix a bug in the code that had been causing errors for weeks.
Example for weak point: During a presentation in college, I stumbled over my words and lost my train of thought.
Q3. Full form of HTML
HTML stands for Hypertext Markup Language.
HTML is a markup language used to create web pages.
It uses tags to define the structure and content of a web page.
HTML can be combined with CSS and JavaScript to create interactive web pages.
Examples of HTML tags include , , ,
, , , etc.
Q4. 2.what is the difference between constructor and method.
Constructor is used to initialize an object while method is used to perform a specific task.
Constructor is called automatically when an object is created while method is called explicitly.
Constructor has the same name as the class while method has a unique name.
Constructor does not have a return type while method has a return type.
Example of constructor: public class Person { public Person() { // constructor code } }
Example of method: public void printName() { // method code ...read more
Q5. Tell Me Difference Between Error And Exception and how exception is handled in java ?
Error is a compile-time issue, while exception is a runtime issue. Exceptions are handled using try-catch blocks in Java.
Error is a compile-time issue, detected by the compiler. Exception is a runtime issue, occurring during program execution.
Errors are generally caused by the environment in which the application is running, while exceptions are caused by the application itself.
In Java, exceptions are handled using try-catch blocks. The code that may throw an exception is pla...read more
Q6. Difference Between Final , Finally , and Finalize in Java .
Final is a keyword used to declare constants, Finally is a block of code that always executes, and Finalize is a method used for cleanup.
Final is used to declare constants in Java.
Finally is a block of code that always executes, typically used in try-catch-finally blocks.
Finalize is a method in Java used for cleanup operations before an object is garbage collected.
Q7. 1.What is an interface.
An interface is a contract that defines a set of methods and properties that a class must implement.
An interface is a blueprint for a class.
It contains only the method signatures and properties.
It does not contain any implementation code.
A class can implement multiple interfaces.
Interfaces are used for achieving abstraction and polymorphism.
Example: IDisposable interface in C#.
Example: Runnable interface in Java.
Q8. What Is Inheritance? Difference between Java and c++?
Inheritance is a mechanism in object-oriented programming where a class inherits properties and behaviors from another class.
Inheritance allows code reuse and promotes code organization.
In Java, classes can only inherit from a single class (single inheritance), while in C++, classes can inherit from multiple classes (multiple inheritance).
Java uses the 'extends' keyword to implement inheritance, while C++ uses the ':' symbol.
In Java, all classes implicitly inherit from the 'O...read more
Q9. What is Joins? Difference between right join and Left Join?
Joins are used in databases to combine rows from two or more tables based on a related column between them.
Joins are used to retrieve data from multiple tables in a single query.
Right join returns all the rows from the right table and the matching rows from the left table.
Left join returns all the rows from the left table and the matching rows from the right table.
In right join, if there is no match, NULL values are returned for the left table.
In left join, if there is no mat...read more
Q10. What is Java ? What is Inheritance?
Java is a popular programming language known for its platform independence.
Java is an object-oriented language.
It was developed by Sun Microsystems.
Java programs are compiled into bytecode and run on a Java Virtual Machine (JVM).
Java supports inheritance, which allows classes to inherit properties and behaviors from other classes.
Inheritance promotes code reusability and helps in creating a hierarchical class structure.
Q11. How Java Works ?
Java is a high-level programming language that follows the principle of 'write once, run anywhere' using the Java Virtual Machine (JVM).
Java code is compiled into bytecode, which is then executed by the JVM.
Java is platform-independent, meaning the same code can run on any device with a JVM.
Java supports object-oriented programming concepts like classes, objects, and inheritance.
Java has a rich set of libraries and frameworks for various applications.
Java applications are typ...read more
Q12. What is Java ? What is inner join ? Difference between Java and c++ What is inheritance?
Top HR Questions asked in Kanwar Enterprises
Interview Process at Kanwar Enterprises
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month