0% found this document useful (0 votes)
28 views14 pages

Java Viva Questions Overview

The document contains a comprehensive list of Java viva questions covering key concepts such as the Java Virtual Machine (JVM), object-oriented programming principles, arrays, multithreading, applets, and graphical user interfaces. It also addresses important topics like inheritance, access specifiers, method overloading, and the use of interfaces and abstract classes. This resource serves as a study guide for understanding fundamental Java programming concepts and their applications.

Uploaded by

Prince Pandey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views14 pages

Java Viva Questions Overview

The document contains a comprehensive list of Java viva questions covering key concepts such as the Java Virtual Machine (JVM), object-oriented programming principles, arrays, multithreading, applets, and graphical user interfaces. It also addresses important topics like inheritance, access specifiers, method overloading, and the use of interfaces and abstract classes. This resource serves as a study guide for understanding fundamental Java programming concepts and their applications.

Uploaded by

Prince Pandey
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd

JAVA * VIVA

Sybca
Viva Questions
 Java Virtual Machine  (JVM)
 "write once, run anywhere".  Concept
 "simple," "object-oriented,"  buzzwords
"platform-independent,"
"robust," and "secure".
 variables, methods, classes,  Identifiers
interfaces, and objects
 to change one data type to  Type
another
casting
 An array can be defined as a
group or collection of similar
kinds of elements or data
 An array
Viva Questions

 A two-dimensional array  Matrix


 A variable that stores the  Pointer
memory address of an object
 This is used to declare a  * symbol
pointer,
 & symbol
 This is used to get the
address of a variable
 ?: operator
 if-then-else statement
 20;
 Int
 "Good day."
 String
Viva Questions
 It is a collection of similar  Package
classes, subclasses
 Built-in packages. User-defined  two types of
packages packages
 location of user-defined classes  CLASSPATH
and packages.
 To import all the classes of the  * symbol
package
 to declare a behavior that  Interface
classes must implement
 public, static, and final.
 variables in
an interface
Viva Questions
 The keyword is used to  Implements
implement an interface
 It is the main class on which  thread class
Java's multithreading
system is based.
 execution of two or more
parts of a program for
 Multithreadi
maximum utilization of CPU ng
 method returns true if the
thread upon which it is  isAlive()
called is still running
otherwise it returns false.
Viva Questions
 a thread's priority is an  range 1 to 10
integer  Synchronizati
 process that allows only one on
thread at a particular time to
complete a given task
entirely.  deadlock.
 Synchronization is the most
dangerous word in Java
because this is the only
 Race
reason for the Condition
 occurs when multiple
processes or threads access
shared resources concurrently  Java applet
 It is a small program designed
Viva Questions
 Applets are typically accessed  HTML pages
through, which specify how to
load and run the applet.
 init(): start(): stop():destroy():  Lifecycle
 paint():
 Java runtime environment (JRE)
is responsible for loading and
 JRE
executing the applet.
 method is responsible for
drawing the applet's content.  paint()
 method, defined in the
Graphics class, actually does  drawString
the drawing
Viva Questions
 refers to the structure and  Architecture
components involved in
creating and running applets
 It is an object having a graphical  Component
representation that can be
displayed on the screen
 are the buttons, checkboxes,
and scrollbars of a typical
 Component
graphical user interface. s
 It is a component in AWT that
can contain another
components like buttons,  Container
textfields, labels etc.
Viva Questions
 is a top-level window with a title  Frame
and a border.
 The default layout for a frame is  BorderLayou
 blank rectangular area t
 is an object that controls the  Canvas
size and position (layout) of  A layout
components
manager
 is used to draw or paint on
the components
 Graphical User Interface
 Graphics

 a color and can be represented


 GUI
by a float value in the range
 0 - 255.
Viva Questions
 There are three main categories *  Control
Selection, Iterative, Jump  Stateme
 while loop guarantees the loop nts
execution at least once.  while
 Java continue statement is used to loop
skip the current iteration of a loop.
 continue
 The return keyword in Java is used stateme
to exit from a method nt

 return
keyword
Viva Question
 It is a fundamental concept in  A class
object-oriented programming
 A method in is a set of  A method
instructions  a
 a constructor is a special construct
method used to initialize or
objects of a class.
 The this keyword in Java serves
 this key
word
as a reference to the current
object within a method
 Method overloading in Java
 Method
allows a class to have multiple
overloadi
methods with the same name
ng
but different parameter lists.
Viva Question
 'Call by Value' is a parameter  'Call by
passing convention where the
actual parameters are Value’
evaluated and value of original  Swap
variables remains unchanged
 a copy of the object's reference  call by
(the memory address) is reference
passed, not the object itself.
 Recursion is a process in which
a function calls itself directly or
indirectly  Recursion

 Public: Protected: Private:  Access


specifiers
Viva Question
 It essentially makes the entity to  final keyw
which it's applied unchangeable ord
after initialization or declaration.
 Inheritance in Java is the method to
create a hierarchy between classes
by inheriting from other classes  Inheritanc
 The super keyword in Java is used to e
refer to the immediate parent class
(superclass) of the current class.
 Super
 The @Override annotation in Java is
used to indicate that a method in a keyword
subclass is intended to override a
method in its superclass  Override
Viva Question
 The purpose of an abstract class  an
is to provide a common definition abstract
of a base class that multiple class
derived classes can share.
 Java ActionListener is an  ActionLis
interface in java. awt. event tener
package.
 The GridLayout class is a layout  GridLayo
manager that lays out a ut
container's components in a
rectangular grid.
 Java Swing is used to develop  Swing
Graphical User Applications
(GUI), desktop-based applications

You might also like