interview quetions .?
** What is ment by java fullstrack developer.?
---> full-strack developer means..who's know ui knowledge, core java, advance java
knowledge and also database like.. Oracle , mysql and little bit knowledge of
testing.
1. what is java architecture.?
>>> in java architecture
i) first we have.. source code create by user and it convert into the byte
code by the compiler
ii)and byte code / and after that byte code getting converted into the machine
code by the jvm
2. what is the compiler .?
>>> compiler convert Source code into the byte code.
3.what is the interpreter / JVM.?
>>> JVM is java vertual m/c which convert byte code into the Machine code. and jvm
act as an interpreter!
4. Defference between jvm and jdk.?
JDK
| JVM
>>>jdk is java devlopmet kit and which is use to develop java software.! :
jvm is a java vertual m/n. which convert byte conde into the m/c code!
5.what is garbase collection.?
>>> its automated process which delete that's code which is not used in longer
time.!
6.what is JDK.?
>>> JDK stand for java development kit. it contain JRE & development tools , and
which is used to.. develop a java aplications / Software
>>>JRE stand for Java Runtime Inveronment. & it's implementation of jvm in JRE it
has set of software tools which are used to provide runtime invironment!
7.what is java features.?
8. can java is become platform independent.?
>>> Yes! Java is platform independent because.. in case of java source code is
getting converted into the byte code ,
and that byte code we can use in defferent operating system! that's why!
9. what is mean by portable.?
>>> we can take java code from one machine to the onother machine
10. what is dynamic loading.?
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
11. what is object oriented languege.?
>>> java is Object Oriented laguage because it deal with Class,
object,polimerphisym , N-capuslation! & inhe-returns, that's why
12.what is abstraction.?
>>> abstraction it's process in which hide implementation and shows only services
Or interfaces & it provides code security.
13. how to achive abstraction .?
>>> we can achive abstraction by two methods.. abstraction class & interface.
14. waht is meant by abstraction class.? ?
>>> an abstraction class which contain an abstract methods and which has no method
body.
15. can we create object of abstract class.?
>>> No we can't create an object of abstract class! but we can create an object
of child of class!
16.what is meant by interface.?
>>> interface is kind of class in which contain abstract methods and also..
variables & objects.
17. what is ment by final keyword.?
>> final keyword means.. if u declared a method Or variable as a final then we
can't overriden it and and can't change there variable values.
18. what is ment by finallies methd & why to use.?
>>> finalies method is use for garbase collection.
19. can we overload main method.?
>>> Yes we can overload the main method but we can't override the main method.
20. what is ment by method overloading.?
>>>overloading mens.. if two or methods having a same access modifer same method
name but having deffernt parameters then this method can say.. method
overloading.
( Overloading can be achive without of inhe-reterns )
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
21. what is ment by method overriding.?
>>> overriding means.. if two or more methods having a same access modifier same
retern type & same method name then this method can say method of overriding.
( Overriding can't achive without of inhe-reterns)
22. what is meant by Class.?
>>> class is keyword. and in which contain methods and variable.
23. exmple of predefined classes.?
i)String class
ii)Scanner class
iii)Wrapper class
iv))Objec class
24. what is ment by String.?
>>> string are nothing but its collection of carectors.
25. what is ment by package.?
>>> A package is kind of container in which contain group of classes and
interfaces!
26. examples of predefined packages.?
>>>
i) java.lang
ii)java.util
iii)java.math
iv)java.io
v)java.time
27.what is ment by default pakage in java.?
>>>
i) java.lang
ii)java.util
iii)java.math
iv)java.io
v)java.time
28. what is ment by exception.?
>>> exception is event which occurs during the execution of program and that
dusturb the normal flow of the program at running time
bbbbb
What is Exception Handling?
Exception Handling is a mechanism to handle runtime errors like..
ClassNotFoundException, IOException & SQLException, etc.
29. what is the need of handeled exception.?
>>> because it help to maintain normal flow of the program and if we can't handle
an exceptiln then program may crash Or may fail.
30. what is ment by multithreading.?
>>> multi-threading is nothing but.. executing multiple thread of simultaneously
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31. what is ment by thread.?
>>> Tread are nothing but executing multiple small task at a time.
32. what are the various state of thread.?
>>> it has runnble state , new state, waiting state and dent state.
33.how do u create of thread.?
>>>we can create thread by creating object of thread class.
34. which two way we extend thread.?
>>> runnble interface and by Thread class.
35. which is the best way to create Thread.? and why. ?
>>> is runnble interface!
Becausse multiple inheretens are not support in java . if we extended thread class
then we can not extends another class . that why Runnable interface is best.
36. what is deffernt between constructor and mehtod.?
>>>
i)constructor don't have return type & has return type,
ii)we can call the constructor by super keyword but in case of method we call
the method by method name.
iii) constructor name must be the same as class name but in case of method we can
set method name as per the requirment.!
37. ??????????????????????????????????????????????????????????????????????????????
????????????????????????
38. what is the class/globle variable and local
variable.??????????????????????????????????????????????????????????????????????????
??????
>>> class variable are nothing but the variable which is declared inside the class
& the local variable which is declared inside the method
and also the class variable we can access inside the method but the Local variable
we can't access out side the method
39. what is method and object .?
>>> method is pies of coad which will perform certern task!
>>> Object is instant of class.
40. what is the types of method.?
>>> i) a method may return or may not return type
ii) a method may take a parameter or may not take a parameter
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
41. difference between class & object.?
>> Class are created by using class keyword & Object is created by using new
keyword.
>> Class is declared once but we can declared an as per requirment.
42. what modifier.?
>>> publi , private, protected & default.
i) public - public access modifier is accessible at anywhere!
ii)private - private access modifier is accessible only within the class!
iii)protected - protected access modifier is accessible within the package and
also inhe-returns case!
iv)default - default are accessible within the package only!
Note: - if we can't create any access modifier then.. it will be automatically set
as default modifier!
43. what is geater and setter.?
>>> are nothing but it's function or method!
44. what is N-capsulation.?
>>> it's the process of rapping of the code / binding the coad into the single
unit!
e.g class or method.
45. what is inhereturns.?
>>> in case of inhe- returns to access all the properties of parent class by
the child class through the extend keyword.!
ther are types of inhe-rerurns likes.. single inhe-returns, multi-inhe-rerurns,
hirarchical inhe-rerurns & hybrit inhe-rerurns.
>>> // and with the help of extend keyword we can extend single inhe-returns,
multi-inhe-rerurns, hirarchical inhe-rerurns & hybrit inhe-rerurns.
46. advantages of inhe-returns?
47. what is supper keyword.?
>>> super keyword is the keyword to access all the properties of parent class.
48. what is polymerphysm.?
>>> are nothing but.. its a same object but having a different behaviour! e.g
like method overloading & method overriding
49. what is advantages of abstraction.??
>>> it provide the code security!
50. what is static polymerphysm.?
>>> static polimerphysim are nothing but its method overloading
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
51. what are the types of inhe-reterns.?
>>>i) single inhe-reterns --> when a class inherate by the other class is
known as single inhe-reterns.
ii) multiple - inhe-reterns --> multiple inhe-reterns mens.. chainof inhe-
reterns.! [ if class A are inherets class B . and cls B are inherets cls C ]
iii) Hirarchical - inhe-reterns --> when.. two or more classes inherates by the
single class then it is known as hirarchical inhe-reterns.
51. why multiple inhe-return is not posible in java.?
>>> because of code complecxity the multipule inhe-reterns is not supported in java
!
suppose.. if we inherets Class A then we can't inherets onother class
but multiple inhe-reterns is supported in interface!
52. how do achive multiple inhe-reterns in java.?
>>> we can achive multiple inheretens in java through interface!
53.what are the type of polymerphsim.?
>>> runtime polymerphysm & completime polymerphysm
where.. runtime polymerphysm is achive through method overriding &
compiletime polymerphysm is achive thorgh method overloading
54.What is ment by class variable & local variable.?
>>> class variable --> it declared inside the class! & local
variable --> it declared inside the method!
55.what is ment by static keyword.?
>>> static i s keyword and which is mainly use for memory management & also we can
use variabbles , methods, class!
56. suppose have a static block , main block & normal block so which one executed
first.?
>>> first static block are executed and then main block and last normal block
will executed!
57.what is static variavle & what is local variable.? // class variable Or local
variale
>>> static variable are present within the class. & local variable are present
within the method.
58. how do we call the static method or static variable.? // simple variable and
simple method.?
>>> we can call static method and static variable by Object name or class name
( class. method_name / objname. variable_name )
59. how to create a package.?
>>>
60. what are the access modifire that we can use for the classe.?
>>> public and default also.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
61. can we declare classe as private or protected.?
>>> No ! if firstly we declare a class as private then we can not declare as
protected!
62.what is constructor.?
63. what is costructor overloading.?
>>> if class contain two or more constructor method then it's called as constructor
overloading.
64. JAVA is 100% object oriented laguege.? or not.?
>>> NO java is not 100% object oriented laguage because they support premitive
data type that's why.
65. why java is portable.?
>>> Java is portable because of byte code! and that byte code we can use in any
other operating system/machine.
67. in java prog. we can write public static void What if i write static pubic void
main intted of public static void main.?
>>> its ok! it will execute there is no problem occurs
68.Can we make constructor as Static.?
>>> No ! we can't make constructor as static Because.. Constructor is used to
initilid the object ,variable so, thats why we can't declare Constructor as
Static!
69. if by mistake some one declare Constructor as Static then.. what will happen.?
>>> then it will give you Compile time error!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
70. which class is the supper class of the all the classes.?
>>> Object is the super class of all the classes!
we can carry java code from one machine to the onother machine
71. what is pointer.?
>>> it's variable and which is used to reffer memory Address . BUt they are
not supports in java Because Security reason !
means.. Pointer take more memory space at run time
72. what are the types of Operator in java.?
>>> Their are 6 types of operator like
i) Assingment OP. & Assignment OP. ii) Logical OP. iii) Comparision OP.
iv)increment OP. v) Drecrement OP.
*what is assingnment op --> is used to assing two or more values
*what is logical operator --> is ued to Compare two or more values. and it will be
return in boolean .
what is comparision op --> is used to Compare two values
73. what is collection .?
>> Collection is a interface in which we can store multiple data! Or defferent
data types values.!
74. what is fremework.?
>> fremework is kind of library in which Contain Or present pre-defined classes and
interfaces!
75. what is collection framework .?
>> collection fremework is API in which defineds group of classes & interfaces and
which is used to store multiple data.
76.what is araylilst.?
>> aylist is class which inherets List interface! & duplicate values and Null
values are allowed in arraylist. & it's non synchronize!
77.what is linkedlist.?
>> linkelist is a class which inherets List interface & duplicat values and Null
valuse are allowed in linkedllist. & it's non-synchronize!
78. whai is victor.?
>> victor is class and which inherits LIst interface. & duplicate value and Null
values are allowed in victor and can store defferent types of data type & its
synchronize class.
79.what is stack.?
>> stack is a implimantation of victor and which follow Last in First out orderd
rule ! & there is push pop and peak method!
peak -used to veiw the data
pop- used to remove remove the data
push- used to add the data.
80.explain Queue interface.?
>> Queue [imagin as container type] is a interface and which follows First in
First out method orderd. and in queue interface we can add element only from rear
side and remove from front side.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
81. explain priority Queue.?
>> Priority queuqe is a class and which inherets Queue interface and which follow
priority orderd. & it accept only one type of data value
82. what is Deque .?
>> Dueque is interface and which extend Queqe interface. in case of dequeue
interface we can add and remove element from front and rear side also!
83.expain Array Dequeue .?
>> Array deque is class and which inherets Dequeue interface and which allow
duplicate values but not Null values!
84.what is Set .?
>> set is a interface! & which implements Treeset and Hasset!
*explain Hasset.?
>>Has set is class & duplicat values and null values are not allowed in has set
& also can't follow shorting order
*explint tree set.?
>> tree set is class and aklso it canot allowed duplicate values null values and
but follow shorting order!
85. explain Map.?
>>map is interface in which allows keys and values.
Hasmap.? >> hash map is class which store keys & vlues and duplicate value &
null value are not allowed there also it can't follow shorting order
Treemap.? >> TreeaMap is a class which also store keys & also.. duplicates values
& null value are not allowed there but it follow shorting order
>>>>> SET & MAP
when we use HashSet.? when we need unique values un shorted data-structure
then!
when we use TreeSet.? when i need unique values and must be shorde
when we use Hashmap.? when we need unique values & unshourted data-structure
then!
when we use TreeMap.? when we need unique values and it must be sorted
when we use array list.? when we need duplicate values with ordered data
structure then!
when we use LInkedlist.? when we need duplicates values & non - ordered data
sttucture then!
86.Defference between array and arraylist
Atrray
| Arraylist
in case of array ! array size is fixed ; & size
of arraylist is not fixed!
insertion and deletion are not posible in array! ; & here insertion and
deletion is posible
in array we can storre only single type of data! ; But in arrylist
we can store multitype OR defferent types of data!
87. defference between arraylist and linklist
Arraylist
| Linkedlist
array list follows ordered data structure ; But Linklist
follows ordered data structure.!
Arraylist is best for storing & Retrive the data! ; & LInkedlist is
best for manupulation the data.!
88. defference between Map & set
Set | Map
set contain only keys : but map contain keys and values.
it's index based collection : and its key base collection !
89. how to create arraylist as synchoronize.?
>> by using synchronise arraylist method.
90. how to remove duplicate element in arraylist Or linkedlist.?
>> we can remove duplicate element by using Hashset and Treeset.!
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
91. can we inherets constructor.?
>> NO we can't inherets constructor but we can inherets variables and methods!
92. Why multiple inheretens are support in java.?
93. defference between Method overriding and Method overloading.?
94. what is ment by array.?
>> an Array is data- structure were store only one type of data & the element are
stored in a continionus memery location !
95. what is defferent between String and String buffer.?
>> String
| String Buffering
String is immuteble
: and string buffer is muteble
[if we store some charector inside the string then we can't change it
: and in case of string buffer we can chainge it].s
and performance of string is slow
: as comapare to string buffer!
96. what is try block and catch block.?
>> Try block.? try is block in which contain only risky code.
>> Catch block.? try block is used to handle an exception from the catch block!
97.what is throws keyword.?
>> Throws keyword are used to throws user define and costomise exception.
Note: all the exception are the class which present inside the java.lang package
like Arthematic , io, class not found Exceptions.. etc..!
98. camparision between throw keyword & throws keyword
>> Throw
| Throws
throw keyword are declared inside the method :
and throws keyword are declared with method siganture!
throw keyword followed by object :
and throws keyword followed by class [ like method_name throws
Arthematic ex, etc..]
[throw new ArthematicException ()
we can Throw only one exception at time :
and in case of throws we can handle multiple exception at time
99. what is synchronization .?
>> synchronixation its a process to control accessebility of multiple threads to
a perticular share thread.!
100. what is ment by synchronization method.?
>> if we declare a method as synchronize then this method is called as synchronize
method.!
101. what is wrapper class.?
>> is class which Wrap the premetive data type into an object of that class.!
what is Marker interface.?
>> marker interface means.. it's empty interface means.. there is no methods and
variables. e.g clonable & seriazable /serialization
Defference between abstraction class and interface
Abstraction class
| INterface
an abstraction class by keyword abstraction.!
: & interface interface declare by keyword interface.
*And we can extends abstract class by using "extends" keyword.
: * And we can implements interface by using "implements" keyword.
* an abstraction class contain abstraction methods & normals method also :
* and interface contain only abstracton methods.!
* Multiple inheretuns are not support in abstraction
: & here multiple inhereturn are support
NOTe>> if u not able to ansewer the quetion , then --> say .. Yes sir but i am not
sure!