Breaking

Thursday, March 7, 2019

how asked java interview questions in 2019

Java interview questions:

Java is a popular language and it is Java interview question is the asked for the Interview:

So here is my blogger to some commonly asked Important Interview question Below.

WHAT IS JAVA?

➽ Java is a high-level programming language and is platform independent.Java is a collection of objects. It was developed by Sun Microsystems. There area unit heaps of applications, websites, and Games that are developed using Java.Java may be an all-purpose programming language that's coincident, Class-based, Object-oriented and specifically designed to have as few implementation dependence as possible.Java runs on a variety of platforms, such as Windows, Mac OS and the various version of UNIX.

WHAT DO YOU MEAN BY ABSTRACT CLASS?

ABSTRACT CLASS IN JAVA:A Class Which is declared as abstract is known as an abstract class.If can have abstract and non-abstract methods. It has to be extended and its methodology enforced. It cannot be instantiated.

TELL ME IMPORTANT POINTS TO ABSTRACT CLASS?

IMPORTANT POINTS TO ABSTRACT CLASS:⇨An abstract class must be declared with an abstract keyword.⇨ It can have abstract and non-abstract methods.⇨It cannot be instantiated.⇨It can have constructors and static methods also.⇨It can have final methods which will force the subclass not to change the body of the methods.

WHAT DO YOU MEAN BY ABSTRACT METHOD?

ABSTRACT METHOD IN JAVA:

⇨A method is declared as abstract and does not have implementation is known as an abstract method.

⇨Abstract classes are classes that contain one or more abstract method.

⇨An abstract methodology may be a methodology that's declared however contains no implementation.

⇨Abstract classes may not be instantiated, and require subclasses to

provide the implementation for the abstract methods.


WHY THE MAIN METHOD IS STATIC IN JAVA?

The method is static as a result of there would be ambiguity:

Which constructor should be called?

Especially if our class looks like this:-


Simple Program:

Public class Javaclass


}

}


WHY USE JAVA?

Java works on completely different platforms (Windows, Mac, Linux, Raspberry Pi, etc.)

It is one amongst the foremost common programming languages within the world

It is straightforward to be told and easy to use

It is open-source and free

It is secure, fast and powerful

It has large community support (tens of uncountable developers)


TELL ME JAVA VERSION?

Java Version History

Now a day 8 versions of java are released, which is listed below with realizing the date.

JDK Alpha and Beta (1995)

JDK 1.0 (23rd Jan 1996)

JDK 1.1 (19th Feb 1997)

J2SE 1.2 (8th Dec 1998)

J2SE 1.3 (8th May 2000)

J2SE 1.4 (6th Feb 2002)

J2SE 5.0 (30th Sep 2004)

Java SE 6 (11th Dec 2006)

Java SE 7 (28th July 2011)

Java SE 8 (18th March 2014)


HOW MANY DATA TYPES IN JAVA?

There area unit 2 sorts of information varieties in JAVA:-

PRIMITIVE DATA TYPES

NON-PRIMITIVE DATA TYPES


DESCRIBE PRIMITIVE DATA TYPES IN JAVA?

A primitive information sort specifies the scale and kind of variable values, and it's no extra ways.

THE PRIMITIVE DATA TYPES INCLUDE-

BOOLEAN

CHAR

BYTE

SHORT

INT

LONG

FLOAT

DOUBLE


WHAT IS WRAPPER CLASSES IN JAVA?

WRAPPER CLASSES

The java defines wrapper classes. The wrapper classes are the class of each data type.

The properties of the data type defined by its wrapper class.

The wrapper classes provide the methods some of them are used to convert

string form of values into its appropriate data types.


WHAT IS AN ARRAY IN JAVA?

ARRAY

ARRAY is the collection of multiple values of the same data type with the help of array.

we can store multiple values. The no. of memories define as the size of an array.

If each separate memory location of an array referred with the index no.

Index no. is started with zero and the last index will be (size-1).

https://www.learnwitharyan.com

No comments:

Post a Comment