Saturday, November 26, 2016

Java Basic Interview Questions and Answers

In this article, we will learn some Basic Java Definitions for freshers. Earlier post, i have shared  what is java and where it is used. Here I am writing Introduction of java and Basic Java interview questions.

Introduction:

Java is an Object Oriented Programming Language was developed by James Gosling at Sun Micro systems in 1995. Now it as acquired by Oracle Corporation.

Java is a Platform independent language. Java Virtual Machine(JVM) is used as an abstraction between the OS and Java programs. This makes java programs highly portable, a java program can run on all supported platforms such as Windows,Linux etc.. without any modifications.

Initially,The main purpose for developing java language is to control consumer electronics devices. On May 23,1995 the java environment was announced by Sun Micro systems. Java is more secure and robust than C and C++.

1) What is Programming Language?

Ans: 
A programming Language is a formal Computer Language which is used to design instructions that are executed by a particular machine for performing some tasks(computation evaluation etc).

2) What is POP?

Ans: POP means Procedure Oriented Programming language is which a list of instructions is given to the computer to follow, in order to perform  a task. These instructions are organized into groups which are known as functions(procedures). Examples: BASIC,BCPL,C,COBOL

3) What is OOP?

Ans: OOP means Object Oriented Programming Language is based on Objects,instead of just functions and procedures. These objects are organized into classes,which allow individual objects to be group together. Examples: C++,JAVA,C# etc..

4) What is Source Code?

Ans:  A source code is a code which is written by programmer in human readable form with proper programming syntax.

5) What is Byte Code?

Ans: Byte Code is the Intermediate code generated by the Java Compiler. Byte Code run by JVM instead of the original machine(computer processor).

6) What is Executable Code?

Ans:  It is the machine understandable code, which can be executed by a machine(OS).

7) What is API?

Ans:  API means Application Programming Interface,is an interface implemented by a software program that enables it to interact with the other software.

8) What is JDK?

ANS:  JDK means Java Development Kit, it is a set of tools which are used for developing java programs.

9) What  is JRE?

ANS: JRE means Java Runtime Environment is a collection of libraries and other components which are required to run code written in java language.

10) What is JVM?

Ans: JVM means Java Virtual Machine,is a traditional platform-independent execution environment that converts java byte code into machine code for execution.

11) What is JavaC?

Ans: JavaC means Java Compiler,which converts java source code(.java) into byte code(.class)

12) What is JCL?

Ans: Java Class Library is a set of libraries that java applications can call at run time.

13) What is Token?

Ans:  Token is a individual unit in a program. Basically they are the individual words,symbols and punctuation marks.

14) What is Constants?

Ans: Constants are the fixed values that do not changed during the execution of a program.

15) What is variable?

Ans: A variable is  a memory-location in the program's memory which is used to store data value or information. Value stored in a variable can be modified during program's execution.

16) What is Identifier?

Ans: Identifier is a tag name for a particular entity which uniquely identifies it. Example: variable,function etc..

17) What is Datatype?

Ans: Data type gives information about type-definitions that means type of data which is to be stored in a variable.




18) What are Keywords?

Ans: Keywords are the reserved words whose meaning is already known to the Compiler.

19) What are Operators?

Ans: Operators are the symbols which perform a predefined operation on operands.

20) What is Expression?

Ans: A statement having valid operators and operands sequence is known as expression.

21) What is Recursion?

Ans: When a function class itself, it is known as Recursion

22) What is class?

Ans: Class is a blue-print from which objects are created. Class contains data members to store information and member functions to operate upon data members.

23)  What is Object?

Ans: Object is an instance of a class. It is basically a real world implementation of the class having all those property values which are defined or structured in the class

24) What is Super class or Base class?

Ans:  Whose properties are inherited by another class

25)  What is derived class?

Ans:  One who inherit the properties of the base class

26) What is Inheritance?

Ans: When a class inherits or acquires the property of another class this is known as inheritance.

27) What is interface?

Ans:  Interface is a way of defining the behavior that's class can implement. It contains only abstract methods and final variables.

28) What is polymorphism?

Ans: Polymorphism means one name many forms that means one entity behaves differently in different situations.

29) What are Wrapper class?

Ans: Wrapper classes are used to convert any primitive data type into an object.

30) What is abstract class?

Ans: Abstract class is a class which can not be instantiated.



No comments:

Post a Comment

High Paying Jobs after Learning Python

Everyone knows Python is one of the most demand Programming Language. It is a computer programming language to build web applications and sc...