0% found this document useful (0 votes)
32 views4 pages

Itpf01 Reviewer

Uploaded by

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

Itpf01 Reviewer

Uploaded by

jiexfg
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

IT PF-01

OBJECT ORIENTED PROGRAMMING


be created easily from existing objects
making object-oriented programs easy to
UNIT 1: PROCEDURAL AND OBJECT-
modify.
ORIENTED APPROACH
 On other hand there’s no simple process to
SIMILARITY add data in POP at least not without revising
the whole program.
Both Procedural Oriented Programming (POP) and
Object-Oriented Programming (OOP) are the high-
level languages in programming world and are
widely used in development of applications.
DEFINITION
Object-oriented programming – is a programming
language that uses classes and objects to create
models based on the real-world environment.
Procedural Oriented Programming - g is a
programming language that follows a stepby-step
approach to break down a task into a collection of
variables and routines (or subroutines) through a
sequence of instructions.
APPROACH
OOPs - concept of objects and classes is introduced
and hence the program is divided into small chunks
called objects which are instances of classes.
POP - the main program is divided into small parts
based on the functions and is treated as separate INTRODUCTION TO JAVA PART 2
program for individual smaller program. Essential Tools in Java Programming
ACCESS MODIFIER  Java can run on various platforms such as
 In OOPs access modifiers are introduced windows, mac or linux.
namely as Private, Public, and Protected.  There are various tools needed to write,
 On other hand no such modifiers are compile and run Java Program.
introduced in POP. Windows, Mac or Linux
SECURITY  Operating System
 Due to abstraction in OOPs data hiding is  Java Development Kit (JDK 6 or higher)
possible and hence it is more secure than  Any text editor.
POP. INSTALLING JDK
 On other hand POP is less secure as
compared to OOPs. • Download JDK over oracle.com
• Download Windows x64
MODULARITY • Install> Agree > Next > Finish
• Go to Installation Folder (Program Files>
 OOPs due to modularity in its programs is
Java Folder> bin), copy path.
less complex and hence new data objects can
IT PF-01
OBJECT ORIENTED PROGRAMMING
• Go to system settings> environmental HISTORICAL BACKGROUND OF JAVA
variables> system variables> path> edit> PROGRAMMING
paste path.
• On the user variable, click new> on variable - Java was first introduced by Sun
name type JAVA_HOME> paste jdk folder. Microsystems and was further acquired
by Oracle in 1995.
MOBILE COMPILERS - It’s first name was Oak.
• Android/IOD - It was immediately collaborated with
• JVdroid/JavaNIDE Netscape Navigator’s Java Virtual
Machine (JVM)
JAVA PROGRAMMING LIFE CYCLE
- Java adapted the syntax of c++
- Writing Code - It promised Write Once, Run
- Compiling Code Anywhere (WORA), providing no cost
- Executing Application run-times on popular platforms.
COMMON TERMS IN JAVA PROGRAMMING
Class - can be defined as a template/blueprint that
describes the behaviors/states that object of its type
support.
Object – represents an entity in the real world that
can be distinctly identified. Objects have states and
behaviors.
Method – basically a behavior.
Attribute – a characteristic/s that describes an
object.
Instance Variables – each object has its unique set
of instance variables.

COMMON TERMS IN JAVA PROGRAMMING


JRE – Java Runtime Environment. A virtual
machine that enables computers to run Java
programs.
JDK – Java Development Kit. A package of
software that provides an environment to run Java
applications.
IT PF-01
OBJECT ORIENTED PROGRAMMING
JVM – Java Virtual Machine. A software Multi-line Comments – Block comments used to
development kit used to develop Java applications. hide multiple lines or provide clues on the code.
Denoted by /* … */.
OUTPUTS OF JAVA PROGRAMMING
Console Output- text-based output.
Windowed Output- Graphical User Interface-
enabled output.

Different Print Methods in Java


• System.out.print(“”); - is used to print
literals on single line.
• System.out.println(“”); - is used to print
literals providing new lines every after
println() methods.
Escape Sequence in Java
Backslash (\) – is an escape sequence and has a
special meaning to the compiler.

UNIT 2:
JAVA PROGRAMMING BASICS
JAVA PROG. COMMENTS
Comments - can be used to explain Java code, and
to make it more readable. It can also be used to
prevent execution when testing alternative code.
TYPES OF COMMENTS NAMING CONVENTIONS
- Single Line Comments Class Names - For all class names, the first letter
- Multi-line Comments should be in Upper Case. If several words are used
Single Line Comments – One liner comments used to form a name of the class, each inner word’s first
to hide single code or provide clue on the code. letter should be in Upper Case.
Denoted by //. Example class: MyFirstJavaClass
Method Names - All method names should start
with a Lower-Case letter. If several words are used
to form the name of the method, then each inner
word's first letter should be in Upper Case.
Example: myMethodName()
IT PF-01
OBJECT ORIENTED PROGRAMMING
Constant Names – All constant names should be in
written in Upper Case. If several words are used to
form the name of the constant, then put underscore
between words.
Example: TAX_RATE

Java Main Method


public static void main(String args[])
Java program processing starts from the main()
method, which is a mandatory part of every Java
application.
JAVA IDENTIFIERS
1. All identifiers should begin with a letter (A to
Z or a to z), currency character ($) or an
underscore (_).
2.After the first character, identifiers can have
any combination of characters.
3.A keyword cannot be used as an identifier.
4.Most importantly identifiers are case sensitive.

You might also like