JAVA Introduction Flashcards
Lecture 1 oop
JVM Stands for
Java virtual machine
JRE Stands for
Java runtime environment
JDK Stands for
java development kit
JVM only understands ….
bytecode
java files are compiled into ….
bytecode
JRE provides the ….,….., and other components to run the applets
libraries and java virtual machine
true or false: JRE contains tools and utilities such as compilers and debugging applets and applications.
false
JDK contains …..
everything in jre plus tools and compilers and debuggers necessary for developing applets and applications
Properties of Java ? (7)
- Object oriented
- Interpreted
- portable
- secure and robust
- multi threaded
- garbage collector
- no support for multiple inheritance
java file is compiled to …
class file (bytecode)
memory in java is allocated (dynamically- manually - statically )
dynamically
deallocation is process of
removing the objects that are no longer referenced from memory
garbage collector helps prevent ….
memory leaks
object oriented programming is a ….
programming paradigm based on the concept of objects
each object contains data in form of ….
fields , methods
object constitutes the
building blocks of the program
true or false : classes can’t form a hierarchy
false , they can
Principles of object oriented programming
Encapsulation
abstraction
inheritance
polymorphism
encapsulation is
process of combining data and methods into a single unit called a class
encapsulation helps in
keep data both safe from outside interference
allows to expose only necessary data
encapsulation can be controlled via
access modifiers private public and protected
abstraction is
to hide complexity of the program by hiding the unnecessary detail from the user can be achieved by using classes
inheritance allows
creating hierarchy of related classes
allows code reusability
Polymorphism is
same concept can have different meaning in different contexts
polymorphism has two forms
overloading and overriding
overloading is
same method name with different parameters
overriding is
same name, same parameter , same return type but different body
branching forms
if-else and switch