Skip to main content

most importent core java interview questions and answers

   Most Important Core  Java Interview Questions &  Answers for fresher and experience both


1. What is java?
A. java is object oriented programing language which is invented by james gosling in 1995. first version of java is called oak but after that its name was changed with java.



2. What are the features of java?
A. There are some features of java : 
  (a) Platform independent.
  (b) Object Oriented Programming Language.
  (c) Strongly-typed Programming Language.
  (d) Interpreted and Compiled Language.
  (e) Automatic Memory Management.

3.What is mean by Platform independent ?
A. Java is plateform independent because java uses JVM ( java virtual machine for run the 
    bytecode wich is generated by java compiler ) and JVM is plateform dependent so every
    java code after compilation it ganerates bytecode wich is pateform independent and we 
   can run this bytecode on any plateform e.i. Windows, Unix, Linux, Mac etc.



4. Why java is Object Oriented Programming Language ?
A. Java is object oriented programming language (OOP not OPPs) because every thing 
    which is present in java is in the form of object's except primitives.


5.What is Object?
A. Object is an instance of a class. When we want to access instance property of any class 
     like instance variable, instance methods then we have need of an instance(Object) of 
     any class then we have to create instance and this instance is nothing but an object.

6.What is class ?
A. A class is nothing but a block which block is define by using class keyword. Class is used 
    for defining state(data) and behaviours(methods) of an object. we can define many thing 
    inside a class like, Constructor, Methods, Block, Variables, Inner Classes, Inner Interfaces
    etc.

7. What is variables in java?
A. A variables is a name of the memory location of any data (like int a = 5; a is a variable   
     name , int is a data type, 5 is data of int type). We use variable to hold the memory  
     location of data so when we need of this data we can simply use it  by using it's name.  

8. What is Operator and what is Operands ?
A. 
      Operator :-  An Operator is a special symbol which is used to perform any kind of mathematical operations.

      Operands :- Operands are the variables which contains the data.

9. How many types of data types available in java?
A. There are two types of data types are available in java


    
10. What is JRE, JVM and JDK in java?
A.



     JVM :- Java Virtual Machine is an abstract machine for executing java byte code (byte   
                 code which is generated by java compiler). It is platform dependent.

                     
     JRE :- Java Runtime Environment is a set of  library which provides important jars, 
                interfaces and classes for execution of java program. It contains jvm inside. It is   
                platform independent.

     JDK :- Java Development Kit is a kit of development tools like Debugger, Compiler. It 
                contains JRE.
                    


























Comments

Popular posts from this blog

Java Inheritance

#Java Inheritance Interview Questions      #inheritance | #multilelelinheritance | #single inheritance | #javainheritance | #oppsinheritance |     #java  | #OOps | #corejava | #corejavainheritance | #java inheritance | #coreinheritance |   #oopjavainheritance   1: What is inheritance?   A: Inheritance is the most important feature in any object-oriented programming language, This is a                child-parent relationship that allows as to reuse the same logic or same code in a specific manner.   2: How many types of inheritance are supported by java? A:  4 types of inheritance are supported by java,           Single-Level, Multi-Level, Hierarchical, Multiple. Note: In java multiple inheritance, we can achive through Interface.                                                                Single Level inheritance Multi-Level inheritance Hierarchical   inheritance

Spring Boot Interview Questions

  S pring Boot Interview Questions     image source - google 1: What is spring boot? A: Spring boot is a project that is created on the spring framework by pivotal people to create minimum configuration and production ready application. 2: What is the current and latest version of spring boot? A: 2.2.1 3: What @Autowired annotation does in spring boot and spring framework? A:  @Autowired annotation tells spring to inject the dependency of this bean to this class. we can use this annotation in both setter and constructor dependency injection  4: How to create a Spring boot project? A: Their are 2 way's to create spring boot project. first one is using spring official  site Spring Initiliazr and the other one is using IDE ( spring tool shuit or Intellij ).             

Html Basics

  image source - google 1: What is HTML ? A:  HTML is a Hiper Text Markup Language, it's basicaly means we can structure our web document throw html markups.If we want to make a web page or web documrnt then we have to first start with the html, like this, <Html>     <Head>     </Head>     <Body>     </Body> </Html> 2: What is <Head>? A: Head is a child tag of Html, this comes under the html parent tag, and it contains the the information about the html page, like css file link, js file link, meta info. , screen size info, and other if you are using bootstrap or popper.js or any jquery file link. 3: What is <Body>? A: Body is also a child tage of html tag but it contain's the data which visible on the wab page only.             like, Tables, Images, List's, Drop Down etc.. 4: Which  basics thing's that we have to remember in general at the time of mking any web page using html ? A: 1: We should save the file with .html ext