0% found this document useful (0 votes)
66 views

OOP With Java Class - 1: Raghavan P

This document provides an introduction to object-oriented programming (OOP) with Java. It discusses the differences between procedural and OOP, the four main pillars of OOP (class, object, method, message passing), and gives an example of a simple "Hello World" Java program. It also outlines some key concepts about Java like the Java Virtual Machine (JVM) and Java Application Programming Interface (API). The document concludes with some assignment questions about Java concepts.

Uploaded by

prags_nie
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
66 views

OOP With Java Class - 1: Raghavan P

This document provides an introduction to object-oriented programming (OOP) with Java. It discusses the differences between procedural and OOP, the four main pillars of OOP (class, object, method, message passing), and gives an example of a simple "Hello World" Java program. It also outlines some key concepts about Java like the Java Virtual Machine (JVM) and Java Application Programming Interface (API). The document concludes with some assignment questions about Java concepts.

Uploaded by

prags_nie
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 16

OOP with Java Class - 1

Raghavan P

Introdcution
Structured Programming
The structured programming paradigm is: Decide which procedure you want Use the best algorithm you can find Here the focus is on the algorithm required to perform the desired computation In this style of programming, importance is given to procedure (logic) and not(less) to the data on which these procedures operate

Structured Programming (Contd)


Modules are tightly coupled They work on global data items Structured programming is often associated with a "top-down" approach to design

Object Oriented Programming


What is OOP? Need for OOP

FOUR MAIN PILLARS OF OBJECT ORIENTED PROGRAMMING LANGUAGE

OOP - Basics
CLASS OBJECT INSTANCE METHOD MESSAGE PASSING

COMPARISON WITH PROCEDURAL PROGRAMMING

object-oriented methods objects message attribute

procedural functions modules argument variable

Assignment
Create classes for each real-world object that you might have observed.

Introduction to JAVA
JAVA TECHNOLOGY
It is both a programming language and a platform.

Java as Programming Language: The buzz words related to the high level programming Language Simple, Object oriented, Distributed, Robust, Secure, Interpreted, High performance,

Java as Platform: The Java platform has two components: The Java Virtual Machine (JVM) The Java Application Programming Interface (API)

for example, MyProgram.java

Because the JVM is available on many different operating systems, the same .class files are capable of running on Microsoft Windows, Solaris, Linux, or Mac OS.

The First Program HelloWroldApp.java


Here is the code of HelloWorldApp.java: class HelloWorldApp { public static void main(String[] args) { System.out.println(Hello World!); // Display the string. }

Compiling the Program


C:\>Path=.; C:\Program
Files\java\jdk1.6.0_16\bin

C:\>javac Example.java C:\>java Example Classpath CLASSPATH tells Java where to search for Class file

C:\> SET CLASSPATH=C:\JDK\JAVA\MYCLASSES;

Assignment
1. What is Bytecode? 2. Write a Java program to print your name. 3. When declaring the main method, which modifier must come first, public or static? 4. Explain about the parameters used by main method. 5. List and explain the features of Java.

You might also like