advertisement

Core Java Part-1

50 %
50 %
advertisement
Information about Core Java Part-1
Education

Published on March 6, 2014

Author: jainulmusani

Source: slideshare.net

Description

Core Java Part-1
advertisement

Object Oriented Technology The JAVA Language Jainul A. Musani 1

Programming Languages •To adapt to changing environments and uses •To implement refinements and improvements in the art of programming Jainul A. Musani 2

History of OOPs  In 1960s Birth of Structured Programming Language  In early 1980s object-oriented programming (OOP) Jainul A. Musani 3

History of OOPs  In 1979 C++ invented by Bjarne Stroustrup 1980s and the early 1990s, C++ took hold. Jainul A. Musani 4

History of OOPs  In 1991 Java was conceived By James Gosling, Patrick Naughton, Chris Warth, Ed Frank, and Mike Sheridan  At Sun Microsystems, Inc. “Oak”  “Java” (1995) Jainul A. Musani 5

Java the Language of Internet  Expanded the universe of objects  Objects can move about freely in cyberspace.  On a network :  passive information/data  dynamic, active programs Jainul A. Musani 6

Java Applications -&- Java Applets  An application is a program that runs on your computer, under the operating system of that computer.  An applet is an application designed to be transmitted over the Internet and executed by a Java-compatible Web browser. Jainul A. Musani 7

Java’s Magic: The Bytecode  An application a highly optimized set of instructions designed to be executed by the Java run-time system - JVM  JVM - Java Virtual Machine  Truly Portable Jainul A. Musani 8

JVM  Interpreter  JVM needs to be implemented for each platform.  Platform independent  Bytecode enables the Java run-time system to execute programs much faster Jainul A. Musani 9

Just In Time (JIT) compiler  Sun supplies its Just In Time (JIT) compiler for bytecode. (Java-2)  JIT compiler is part of the JVM.  It compiles bytecode into executable code in real time, on a piece-by-piece, demand basis. Jainul A. Musani 10

Java Buzzwords  Simple  Secure  Portable  Architecture Neutral  Interpreted  High  Object-oriented performance  Distributed  Robust  Multithreaded  Dynamic Jainul A. Musani 11

Java Versions  Java 1.0  Java 1.1  Java 2, ver.1.4  Java 2, ver.1.5  Java 2, ver.1.6  Java 2  Java 2, ver.1.2  Java 2, ver.1.3 Jainul A. Musani 12

Java the OOP Language  The Three OOP Principles • Encapsulation • Inheritance • Polymorphism  Abstraction Jainul A. Musani 13

Encapsulation A getA( ) B getB( ) Jainul A. Musani 14

Inheritance Bird Flying Robin Non-Flying Swallow Penguin Kiwi Jainul A. Musani 15

Polymorphism Shape Draw( ) Draw( a, b ) Draw( a ) Draw( a, b, c ) Rectangle Circle Triangle Jainul A. Musani 16

• Run time entity Object • Represent a Person, Book, Bank Account, etc… • User defined data Object : Student DATA: Roll_no Name Percentage FUNCTIONS: Total Average Display • Example: Jainul A. Musani 17

• Set Class of Data & Code is class •User defined data-type • Example:  Fruit,  Furniture CLASS DATA: ::::::::::::: ::::::::::::: FUNCTIONS: :::::::::::: ::::::::::::  Vehicle Jainul A. Musani 18

Variables & Data Types • Named memory location that holds a value • In java variables must be declared before it use in the program • Variable must be of some datatype, it tells compiler what type of value it can store Jainul A. Musani 19

Data Types • Java supports eight different basic data types. Type Size in Character Boolean Byte Short Integer Long Float Double Bytes 2 1 bit 1 2 4 8 4 8 Description Keyword 16 bit Unicode char 1 – bit boolean 8 – bits byte 16 – bits short 32 – bits int 64 – bits long 32 – bits float 64 – bits double Jainul A. Musani 20

Declaration & Initialization of variable Datatype varName; // Declaration of Variable varName = Value; Example: int count = 22; Jainul A. Musani 21

Declaration & Initialization of variable float x, y, z; // value here considers as ‘double’ type x = 10.35; x = 10.35f; y = 24.56F; z = y; Jainul A. Musani 22

Declaration & Initialization of variable long m = 254836L; System.out.println(“The value of m is “ + m); Output: The value of m is 254936 Jainul A. Musani 23

Declaration & Initialization of variable Character & Strings char ch = ‘A’; String s1= “This is Testing”; //String is a class provide by Java. Jainul A. Musani 24

Guess the Output Class test { public static void main(String s[]) { char c; boolean flg; int a; System.out.println(c); System.out.println(flg); System.out.println(a); } Jainul A. Musani } 25

Add a comment

Related presentations

Related pages

Core java collections part -1 - YouTube

DURGASOFT is INDIA's No.1 Software Training Center offers online training on various technologies like JAVA, .NET , ANDROID,HADOOP,TESTING TOOLS ...
Read more

Core Java Interview Questions: Part 1

People continue to ask lists of learn-by-rote java core java questions so you need to be prepared. This is the first of a weekly list of core java ...
Read more

Corejava-Wrapper Class-part-1 - YouTube

Corejava-Wrapper Class-part-1 ... Core java || Arrays part -1 by Ratan - Duration: ... Constructor in java Part - 1 - Duration: ...
Read more

Core Java Interview Questions - Part 1 - HowToDoInJava

Are you planning to learn core java? Or an interview is scheduled in coming days? Do not worry and read all interview questions given below to refresh your ...
Read more

Easyread Java Interview Questions - Part 1: Interview ...

Mr Malay Mandal - Easyread Java Interview Questions - Part 1: Interview questions and answers on Core Java jetzt kaufen. ISBN: 9781503024397 ...
Read more

Core Java Interview Questions Part 1 - INTERVIEW PREPARATION

What is the difference between an Interface and an Abstract class? An abstract class can have instance methods that implement a default behavior.
Read more

Modify archives, Part 1 | JavaWorld

Modify archives, Part 1 Supplement Java's util.zip package to make it easy to write or modify existing archives
Read more

Java Strings Part 1 - Bullraider

Back; Java Collections Part 1; Java Collections Part 2; Java Overriding Part 1; Java Overriding Part 2; Java Annotation; Java Strings Part 1; Java Strings ...
Read more

Core JAVA - Columbia University

1 Core JAVA nFundamental Concepts nBootstrapping nBasic Language Syntax nCommon Caveats nCoding Conventions Core JAVA nFundamental Concepts nBootstrapping
Read more

Taming Tiger, Part 1 | JavaWorld

Welcome to the first of a three-part series on Sun Microsystems' latest release of the Java 2 Platform, Standard Edition (J2SE). J2SE 1.5—code-named ...
Read more