Oops interview questions and answers pdf

Date published 

 

OOPS is abbreviated as Object Oriented Programming system in which Top 50 OOPs Interview Questions & Answers .. Download PDF. NET - Object-Oriented Programming" interview questions and answers with NET - Object-Oriented Programming" quiz questions with answers as PDF files. Object Oriented Programming Interview Questions and Answers will prepare anyone easily towards Object Oriented Programming interviews, online tests.

Author:STAN MATHUS
Language:English, Spanish, Dutch
Country:Jordan
Genre:Academic & Education
Pages:542
Published (Last):23.02.2016
ISBN:908-5-61613-701-8
Distribution:Free* [*Registration needed]
Uploaded by: GIUSEPPINA

69809 downloads 116351 Views 12.81MB PDF Size Report


Oops Interview Questions And Answers Pdf

What is Object Oriented Programming? Object Oriented Programming (OOP) is a programming paradigm where the complete software operates as a bunch of. Top 50 OOPs Interview Questions 1. What is OOPS? OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a. What is OOPS? OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects.

OOPS is abbreviated as Object Oriented Programming system in which programs are considered as a collection of objects. Each object is nothing but an instance of a class. A class is simply a representation of a type of object. Encapsulation is an attribute of an object, and it contains all data which is hidden. That hidden data can be restricted to the members of that class. Polymorphism is nothing but assigning behavior or value in a subclass to something that was already declared in the main class. Simply, polymorphism takes more than one form. Inheritance is a concept where one class shares the structure and behavior defined in another class. If inheritance applied on one class is called Single Inheritance, and if it depends on multiple classes, then it is called multiple Inheritance. Examples are endl and setw.

A platform is the hardware or software environment in which a piece of software is executed. There are two types of platforms, software-based and hardware-based.

Java provides the software-based platform. There are the following differences between the Java platform and other platforms. Java is the software-based platform whereas other platforms may be the hardware platforms or software-based platforms. Java is executed on the top of other hardware platforms whereas other platforms can only have the hardware components.

The bytecode. Java compiler converts the Java programs into the class file Byte Code which is the intermediate language between source code and machine code. This bytecode is not platform specific and can be executed on any computer. Classloader is a subsystem of JVM which is used to load class files.

Whenever we run the java program, it is loaded first by the classloader. There are three built-in classloaders in Java. Bootstrap ClassLoader: This is the first classloader which is the superclass of Extension classloader. It loads the rt. Extension ClassLoader: This is the child classloader of Bootstrap and parent classloader of System classloader.

It loads the class files from the classpath. By default, the classpath is set to the current directory. You can change the classpath using "-cp" or "-classpath" switch.

It is also known as Application classloader.

Yes, Java allows to save our java file by. It is empty, but not null. The program compiles and runs correctly because the order of specifiers doesn't matter in Java.

The local variables are not initialized to any default value, neither primitives nor object references. In Java, access specifiers are the keywords which are used to define the access scope of the method, class, or a variable.

OOPS Interview Questions & Answers

In Java, there are four access specifiers given below. Public The classes, methods, or variables which are defined as public, can be accessed by any class or method.

Protected Protected can be accessed by the class of the same package, or by the sub-class of this class, or within the same class. Default Default are accessible within the package only. By default, all the classes, methods, and variables are of default scope. Private The private class, methods, or variables defined as private can be accessed within the class only.

The methods or variables defined as static are shared among all the objects of the class. The static is the part of the class and not of the object. Attributes and behavior of an object are defined by the class definition. What is the relationship between a class and an object? A class acts as a blue-print that defines the properties, states, and behaviors that are common to a number of objects. An object is an instance of the class. For example, you have a class called Vehicle and Car is the object of that class.

You can create any number of objects for the class named Vehicle, such as Van, Truck, and Auto. The new operator is used to create an object of a class.

OOPS Interview Questions and Answers

When an object of a class is instantiated, the system allocates memory for every data member that is present in the class. Explain the basic features of OOPs. The following are the four basic features of OOP: Abstraction - Refers to the process of exposing only the relevant and essential data to the users without showing unnecessary information. Polymorphism - Allows you to use an entity in multiple forms.

36 Oops Interview Questions and Answers - Object Oriented Programming

Encapsulation - Prevents the data from unwanted access by binding of code and data in a single unit called object. Inheritance - Promotes the reusability of code and eliminates the use of redundant code.

It is the property through which a child class obtains all the features defined in its parent class. When a class inherits the common properties of another class, the class inheriting the properties is called a derived class and the class that allows inheritance of its common properties is called a base class. What is the difference between arrays and collection? Arguments and results are of different data types , and it is depends on the function. Ternary operator is also called asconditional operator.

Answer : Finalize method helps to perform cleanup operations on the resources which are not currently used. Finalize method is protected , and it is accessible only through this class or by a derived class. Answer : A parameter is a variable used during the declaration of the function or subroutine and arguments are passed to the function , and it should match with the parameter defined.

There are two types of Arguments. What Is Super Keyword? Answer : Super keyword is used to invoke overridden method which overrides one of its superclass methods.

This keyword allows to access overridden methods and also to access hidden members of the superclass. It also forwards a call from a constructor to a constructor in the superclass. What Is Method Overriding?

Object-Oriented Programming - .NET Interview Questions and Answers

Answer : Method overriding is a feature that allows sub class to provide implementation of a method that is already defined in the main class. This will overrides the implementation in the superclass by providing the same method name, same parameter and same return type.

What Is An Interface?

Answer : An interface is a collection of abstract method.

Similar files:


Copyright © 2019 aracer.mobi.
DMCA |Contact Us