Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.

Slides:



Advertisements
Similar presentations
1 pritisajja.info Unlocking the World of Java Programming….. Priti Srinivas Sajja February, 2014 Visit pritisajja.info for detail Future Technology for.
Advertisements

Date: Subject:Distributed Data Processing Name:Maria Br ü ckner.
Introduction To Java Objectives For Today â Introduction To Java â The Java Platform & The (JVM) Java Virtual Machine â Core Java (API) Application Programming.
Lab Information Security Using Java (Review) Lab#0 Omaima Al-Matrafi.
 2005 Pearson Education, Inc. All rights reserved Introduction.
The Java Language. Topics of this Course  Introduction to Java  The Java Language  Object Oriented Programming in Java  Exceptions Handling  Threads.
Client Side Programming Using Java Applet Outcomes: You will be expected to know: – Java Applets and HTML file; –bytecode and platform independent programs;
Object Orientated Programming
Introduction to Java.
Introduction to Java Programming Language Junji Zhi University of Toronto 1.
Session-02. Objective In this session you will learn : What is Class Loader ? What is Byte Code Verifier? JIT & JAVA API Features of Java Java Environment.
Lecture 1: Overview of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++ Designed.
01 Introduction to Java Technology. 2 Contents History of Java What is Java? Java Platforms Java Virtual Machine (JVM) Java Development Kit (JDK) Benefits.
Java PAL.  Contains the development kit and the runtime environment ( aka the Java Virtual Machine )  Download Link:
CMSC 341 Introduction to Java Based on tutorial by Rebecca Hasti at
Introduction to Java Tonga Institute of Higher Education.
CSCI 224 Introduction to Java Programming. Course Objectives  Learn the Java programming language: Syntax, Idioms Patterns, Styles  Become comfortable.
About the Java  Java technology is both a programming language and a platform –The Java Programming Language A high-level language that can be characterized.
 Java Programming Environment  Creating Simple Java Application  Lexical Issues  Java Class Library.
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Introduction to Java. 2 Module Information Programming conceptsPrerequisites Beginners in JAVATarget Audience This module will provide you a solid grounding.
DAT602 Database Application Development Lecture 5 JAVA Review.
Java Introduction Lecture 1. Java Powerful, object-oriented language Free SDK and many resources at
By Nicholas Policelli An Introduction to Java. Basic Program Structure public class ClassName { public static void main(String[] args) { program statements.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and Server Side Programming Very rich GUI libraries Portability (machine independence) A.
Introduction to Programming David Goldschmidt, Ph.D. Computer Science The College of Saint Rose Java Fundamentals (Comments, Variables, etc.)
CS 11 java track: lecture 1 Administrivia need a CS cluster account cgi-bin/sysadmin/account_request.cgi need to know UNIX
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
© 2012 Pearson Education, Inc. All rights reserved. 1-1 Why Java? Needed program portability – Program written in a language that would run on various.
Introduction and Features of Java. What is java? Developed by Sun Microsystems (James Gosling) A general-purpose object-oriented language Based on C/C++
POS 406 Java Technology And Beginning Java Code
Java means Coffee Java Coffee Beans The name “JAVA” was taken from a cup of coffee.
CS591x A very brief introduction to Java. Java Developed by Sun Microsystems was intended a language for embedded applications became a general purpose.
Introduction to java Prepared By:-Pragnesh Patel Lect. In Computer Dept. NSIT,Jetalpur 1.
Applied Computing Technology Laboratory QuickStart C# Learning to Program in C# Amy Roberge & John Linehan November 7, 2005.
1 Introduction to Java. 2 What is Java? A programming language. A platform –A virtual machine (JVM) definition. –Runtime environments in diverse hardware.
Object Oriented Programming Lecture 3. Introduction  In discussing Java, some items need to be clarified  The Java programming language  The Java virtual.
National Taiwan University Department of Computer Science and Information Engineering National Taiwan University Department of Computer Science and Information.
4-Nov-15 Air Force Institute of Technology Electrical and Computer Engineering Object-Oriented Programming Design Topic 1: The Java Environment Maj Joel.
Copyright © Mohamed Nuzrath Java Programming :: Syllabus & Chapters :: Prepared & Presented By :: Mohamed Nuzrath [ Major In Programming ] NCC Programme.
Chapter 1: Introducing JAVA. 2 Introduction Why JAVA Applets and web applications Very rich GUI libraries Portability (machine independence) A real Object.
JAVA Programming “When you are willing to make sacrifices for a great cause, you will never be alone.” Instructor: รัฐภูมิ เถื่อนถนอม
1. An Introduction A Programming Language A Technology Java Development Kit Java API One Language: Three Editions Standard Edition Enterprise Edition.
Overview of Java CSCI 392 Day One. Running C code vs Java code C Source Code C Compiler Object File (machine code) Library Files Linker Executable File.
Developed at Sun Microsystems in 1991 James Gosling, initially named “OAK” Formally announced java in 1995 Object oriented and cant write procedural.
© 2012 Pearson Education, Inc. All rights reserved types of Java programs Application – Stand-alone program (run without a web browser) – Relaxed.
introductory lecture on java programming
3/5/2002e-business and Information Systems1 Java Java Java Virtual Machine (JVM) Java Application Program Interface (API) HW Kernel API Application Programs.
Execution ways of program References: www. en.wikipedia.org/wiki/Integrated_development_environment  You can execute or run a simple java program with.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
AP Refresher Module Introduction to Java Advanced Programming. All slides copyright: Chetan Arora.
RealTimeSystems Lab Jong-Koo, Lim
Features of JAVA PLATFORM INDEPENDENT LANGUAGE JAVA RUNTIME ENVIRONMENT (JRE) JAVA VIRTUAL MACHINE (JVM) JAVA APP BYTE CODE JAVA RUNTIME ENVIRONMENT.
Spring 2006 Special Topics in Computer Engineering: Java Intro 1 Crash Course in Java Based on notes from D. Hollinger Based in part on notes from J.J.
SESSION 1 Introduction in Java. Objectives Introduce classes and objects Starting with Java Introduce JDK Writing a simple Java program Using comments.
Sung-Dong Kim, Dept. of Computer Engineering, Hansung University Java - Introduction.
Object Oriented Programming in
Java Basics Introduction to Java.
Chapter No. : 1 Introduction to Java.
Internet and Java Foundations, Programming and Practice
Java Virtual Machine Complete subject details are available at:
Introduction to Java Dept. Business Computing University of Winnipeg
Unit 41 – Programing in Java
An Introduction to Java – Part I, language basics
(Computer fundamental Lab)
Introducing Java.
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
Computer Programming-1 CSC 111
Presentation transcript:

Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html

Java is Simple: Small language, Small Interpreter(40k) and large libraries Object Oriented: Supports encapsulation,inheritance,abstraction and polymorphism. Architecture neutral: Java source files are compiled to byte codes and are interpreted by the jvm. Portable: Primitive data types and their behaviour are specified by the language Libraries define portable interfaces. Distributed: Libraries for network programming and remote method invocation. Multithreaded: Threads are easier to create and use. Secure: Sandbox model, java byte code verification. Automatic memory management :Garbage collection

Architecture

Java Virtual Machine Load class files and execute the byte codes. Class files from java api that are needed by the program are loaded into JVM. Byte codes are executed in execution engine Class Loader Execution Engine Host Operating Systema Program class files Java api class files

Class loader Bootstrap class loader Loads the core Java libraries[5] ( /lib directory). This class loader, which is part of the core JVM, is written in native code. Extensions class loader loads the code in the extensions directories ( /lib/ext or any other directory specified by the java.ext.dirs system property). It is implemented by the sun.misc.Launcher$ExtClassLoader class. System class loader The system class loader loads code found on java.class.path, which maps to the system CLASSPATH variable. This is implemented by the sun.misc.Launcher$AppClassLoader class.CLASSPATH User Defined class loaders By default, all user classes are loaded by the default system class loader, but it is possible to replace it by a user-defined ClassLoader.

Garbage collection Automatically removes unused objects from memory and thus developer need not explicitly free the memory of the objects used Benefits Avoids memory leakage Avoid memory corruption Increase productivity

Installation Download and install Java sdk for your Operating system Set JAVA_HOME environment variable to be the path of home directory of your java installation Add %JAVA_HOME%/bin to path environment variable in windows Type java –version in your command line will give details of your java installation.

Hello world package com.training; class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); // Display the message. }

Running the program Create a source file(.java file) A source file contains code, written in the Java programming language, that you and other programmers can understand. You can use any text editor to create and edit source files. It should be.java file and the name of the file should match the name of the public class in the file. There can be only one public class in a java source file. Compile the source file into a.class file The Java programming language compiler (javac) takes your source file and translates its text into instructions that the Java virtual machine can understand. The instructions contained within this file are known as bytecodes. Javac HelloworldApp.java This will create a HelloworldApp.class file in the package specified in the java file. Run the program The Java application launcher tool (java) uses the Java virtual machine to run your application. Java HelloworldApp HelloWorldApp, will simply display the greeting "Hello world!".

Data Types Integral byte short int long Textual char String Floating Point types float double Boolean Type true false

Arrays A fixed length structure that stores multiple values of the same type. // Creating an array of type String of length 10 String [] names =new String[10] names[0]=“Kumar”; names[1]=“Raj”; // Print array values for(int i=0;i<names.length;i++){ System.out.println(names[i]); } // multi dimentional int [][] matrix = new int[4]; matrix[0] = new int[10]; matrix[1]=new int[2-0]; System.out.println(“first element :”+matrix[0][0]);

Why java?  OOP simplified (compared to C/C++).  Multithreading support.  A good collection library.  Platform independence.  JVM and automatic memory management  Security with sandbox model  Comparatively good performance.

Hands-on Hello world program Use of PATH and CLASSPATH Create a class and add to classpath and try to use it. Create a jar and add to ext\lib and use it. Input and output through console. (Write a program to accept two numbers and to print the result) Use of different data types (Program a calculator which supports four basic operations) Using Arrays Accept names separated by space in a line and print the count. Jar creation

References html html html html paths.html paths.html fundamentals.html fundamentals.html