Prelims Flashcards
Who created JAVA and when?
James gosling et.al at sun microsystems, 1991
What was the initial name of java?
Oak, it was changed to java because there is already a programming lang named oak
The motivation for java is the need for platform independent language that could be embedded in various electronic products.
True
One of the first projects developed in java
A personal hand held remote control named star 7
The java technology is
- A programming language
- Deployment environment
- Application environment
- Development environment
As a programming language, Java can create all
kinds of applications that you could create using
any conventional programming language.
True
As a development environment, Java technology provides
you with a large suite of tools which are?
- Interpreter
- Compiler
- documentation generator
- class file packaging tool
Java technology applications are typically general-
purpose programs that run on any machine where
the Java runtime
environment (JRE) is installed.
True
Two main deployment environments
JRE supplied by java 2 software development kit, and on the web browser
contains the complete set
of class files for all the Java technology packages,
which includes basic language classes, GUI
component classes, and so on.JRE supplied by java 2 software development kit,
JRE supplied by java 2 software development kit
Code for printing output in Java
System.out.println(“ “);
Phases of java program
Editor - compiler - interpreter
(Write, compile, run)
Features of java
Java virtual machine ( JVM)
Garbage collection
Code security
An implementation - Its implementation is
known as JRE (Java Runtime Environment).
True
Whenever you write java
command on the command prompt to run the
java class, an instance of JVM is created.
True
Responsible for freeing any memory that could be freed. Happens automatically.
Garbage collection
It is attained in java through the implementation of the java runtime environment
Code security
Runs code for a JVM and performs class loading
Java runtime environment (JRE)
Responsible for loading all classes needed for java program.
Class loader
Adds security by separating namespaces for the classes of local file system
Class loader
Tests the format of the code fragments and checks the code fragments for illegal codes
Bytecode verifier
programming
style which is associated with the concepts like
class, object, Inheritance, Encapsulation,
Abstraction, Polymorphism.
Object oriented programming
Traditional procedural-oriented programming
languages (such as C, Fortran, Cobol and Pascal)
suffer some notable drawbacks in
creating reusable software components.
True
Functions are less reusable.
True
about writing procedures or methods
that perform operations on the data,
Procedural programming
about creating objects that contain both data and
methods.
Object oriented programming
Procedural programming has several advantages over object oriented programming
False
The problem solving phases
- Analysis
- General solution
- Verify
Procedural programming
Features
- top down design
- limited code reuse
- complex code
- global data focused
Object oriented programming features
- object focused
- code reuse
- complex design
- protected data
Advantages of OOP
- faster and easier to execute
- provides clear structure for programs
- helps keep the java code dry and easy to modify
What does DRY means
Don’t repeat yourself
What is the basic unit of OOP
Class
Two main aspects of object oriented programming
Classes and objects
like an object constructor,
or a “blueprint” for creating objects.
Class
The keyword for creating a new class
class