IT-Asset
BYLD Group Interview Questions and Answers
Q1. What is the difference between C++ & Java?
C++ is a compiled language with pointers and memory management, while Java is an interpreted language with garbage collection.
C++ is faster than Java due to direct memory access.
Java is platform-independent, while C++ is platform-dependent.
C++ supports multiple inheritance, while Java only supports single inheritance.
Java has built-in support for multithreading, while C++ requires external libraries.
C++ allows for manual memory management, while Java uses automatic garbage co...read more
Q2. Why is multiple inheritance not supported in java?
Java doesn't support multiple inheritance to avoid diamond problem and complexity.
Java supports single inheritance to promote simplicity and avoid ambiguity.
Multiple inheritance can lead to the diamond problem where a class inherits from two classes with a common parent.
Java provides interfaces to achieve multiple inheritance of type without the diamond problem.
Example: class A and class B both have a method with the same name, if a class C inherits from both A and B, it will...read more
Q3. What is wrapper class?
Wrapper class is a class that wraps a primitive data type to provide additional functionality.
Wrapper classes are used to convert primitive data types into objects.
They provide methods to convert between primitive types and objects.
Wrapper classes are immutable.
Examples include Integer, Double, and Boolean.
Q4. What is constructor?
A constructor is a special method that is used to initialize objects in a class.
Constructors have the same name as the class they belong to.
They are called automatically when an object is created.
They can take parameters to initialize the object's properties.
If a class does not have a constructor, a default constructor is created.
Constructors can be overloaded to provide multiple ways to initialize an object.
Q5. What is polymorphism?
Polymorphism is the ability of an object to take on many forms.
Polymorphism allows objects to be treated as instances of their own class or as instances of their parent class.
It enables the use of a single interface to represent multiple types of objects.
Examples include method overloading, method overriding, and interfaces in Java.
Polymorphism is a key concept in object-oriented programming.
Q6. What is Java?
Java is a high-level, object-oriented programming language used for developing desktop, web, and mobile applications.
Java is platform-independent and can run on any operating system
It is known for its security features and is widely used in enterprise applications
Java code is compiled into bytecode which can be run on a Java Virtual Machine (JVM)
Popular frameworks and libraries in Java include Spring, Hibernate, and Apache Struts
Q7. What is inheritance?
Inheritance is a mechanism in object-oriented programming where a new class is created by inheriting properties of an existing class.
Inheritance allows code reuse and promotes code organization.
The existing class is called the parent or superclass, and the new class is called the child or subclass.
The child class inherits all the properties and methods of the parent class, and can also add new properties and methods.
For example, a class Animal can be a parent class, and class...read more
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month