Java Programming MCA-301. Rajeev Gupta, MMICTBM (MCA), MMU, Mullana

Similar documents
INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

An Overview of Java. overview-1

Topics. Introduction. Java History CS 146. Introduction to Programming and Algorithms Module 1. Module Objectives

Contents. Java - An Introduction. Java Milestones. Java and its Evolution

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

JAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.

Introduction to Java

Characteristics of Java (Optional) Y. Daniel Liang Supplement for Introduction to Java Programming

Pemrograman Dasar. Basic Elements Of Java

The C Programming Language course syllabus associate level

The Java Virtual Machine Specification

Basic Programming and PC Skills: Basic Programming and PC Skills:

Java Interview Questions and Answers

The Java Series. Java Essentials I What is Java? Basic Language Constructs. Java Essentials I. What is Java?. Basic Language Constructs Slide 1

picojava TM : A Hardware Implementation of the Java Virtual Machine

Introduction to Java. CS 3: Computer Programming in Java

Java in Education. Choosing appropriate tool for creating multimedia is the first step in multimedia design

Chapter 7D The Java Virtual Machine

Java Programming Fundamentals

2 Introduction to Java. Introduction to Programming 1 1

Java (12 Weeks) Introduction to Java Programming Language

ATSBA: Advanced Technologies Supporting Business Areas. Programming with Java. 1 Overview and Introduction

6.1. Example: A Tip Calculator 6-1

CSC 551: Web Programming. Spring 2004

Habanero Extreme Scale Software Research Project

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

1. Overview of the Java Language

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

Chapter 1 Java Program Design and Development

CS 111 Classes I 1. Software Organization View to this point:

Chapter 2: Elements of Java

UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming

How To Write A Program In Java (Programming) On A Microsoft Macbook Or Ipad (For Pc) Or Ipa (For Mac) (For Microsoft) (Programmer) (Or Mac) Or Macbook (For

Chapter 1 Introduction to Computers, Programs, and Java

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Habanero Extreme Scale Software Research Project

CS 209 Programming in Java #1

Object Oriented Software Design

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

core. Volume I - Fundamentals Seventh Edition Sun Microsystems Press A Prentice Hall Title ULB Darmstadt

Free Java textbook available online. Introduction to the Java programming language. Compilation. A simple java program

Online Recruitment System 1. INTRODUCTION

Object Oriented Software Design

9/11/15. What is Programming? CSCI 209: Software Development. Discussion: What Is Good Software? Characteristics of Good Software?

CS1020 Data Structures and Algorithms I Lecture Note #1. Introduction to Java

Variables, Constants, and Data Types

Syllabus for CS 134 Java Programming

Java for WebObjects Developers. Provides a quick-start guide for developers learning to use Java with WebObjects

Programming Languages

Crash Course in Java

#820 Computer Programming 1A

VB.NET Programming Fundamentals

Fundamentals of Java Programming

Course Name: ADVANCE COURSE IN SOFTWARE DEVELOPMENT (Specialization:.Net Technologies)

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Introduction to Java Applications Pearson Education, Inc. All rights reserved.

A Java-based system support for distributed applications on the Internet

Bachelors of Computer Application Programming Principle & Algorithm (BCA-S102T)

SmartArrays and Java Frequently Asked Questions

Java Crash Course Part I

Introduction. Why (GIS) Programming? Streamline routine/repetitive procedures Implement new algorithms Customize user applications

SE 450 Object-Oriented Software Development. Requirements. Topics. Textbooks. Prerequisite: CSC 416

Chapter 1. Introduction to Computers, Programs, and Java

Topics. Parts of a Java Program. Topics (2) CS 146. Introduction To Computers And Java Chapter Objectives To understand:

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

Java CPD (I) Frans Coenen Department of Computer Science

OKLAHOMA SUBJECT AREA TESTS (OSAT )


Java vs. Java Script

AP Computer Science Java Subset

C Programming. for Embedded Microcontrollers. Warwick A. Smith. Postbus 11. Elektor International Media BV. 6114ZG Susteren The Netherlands

Sources: On the Web: Slides will be available on:

Implementing Java Distributed Objects with JDBC

Programming and Data Structures with Java and JUnit. Rick Mercer

Java Application Developer Certificate Program Competencies

The Java Virtual Machine (JVM) Pat Morin COMP 3002

Object-Oriented Design Lecture 4 CSU 370 Fall 2007 (Pucella) Tuesday, Sep 18, 2007

Java Programming. Binnur Kurt Istanbul Technical University Computer Engineering Department. Java Programming. Version 0.0.

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

The Sun Certified Associate for the Java Platform, Standard Edition, Exam Version 1.0

Mobile Application Languages XML, Java, J2ME and JavaCard Lesson 04 Java

Chapter 6: Programming Languages

Comparative Study of C, C++, C# and Java Programming Languages

Java History. Java History (cont'd)

Chapter 2 Introduction to Java programming

CS 106 Introduction to Computer Science I

Part I. Multiple Choice Questions (2 points each):

java.util.scanner Here are some of the many features of Scanner objects. Some Features of java.util.scanner

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

Evolution of the Major Programming Languages

Installing Java. Table of contents

C++ Programming Language

Chapter 1 Fundamentals of Java Programming

C Compiler Targeting the Java Virtual Machine

Embedded Programming in C/C++: Lesson-1: Programming Elements and Programming in C

Transcription:

Java Programming MCA-301 Rajeev Gupta, MMICTBM (MCA), MMU, Mullana 1

Java Programming Java is a general purpose Object-Oriented Programming Language It is intended to let application developers "Write Once, Run Anywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to run on another. It was conceived by Bill Joy, James Gosling, Patrick Naughton, Chris Warth, Ed Frank and Mike Sheridan at Sun Microsystems Inc. in 1991. The original impetus for Java was not the Internet. Java was originally designed for interactive television, but it was too advanced for the digital cable television industry at the time. The primary motivation was the need for a platform independent (Architectural-Neutral) language that could be used to create Software to be embedded in various consumer electronic devices, such as Microwave Ovens and Remote Controls. The language was initially called Oak after an oak tree that stood outside Gosling's office; it went by the name Green later, and was later renamed Java. Internet Version of C++ 2

History of Java 1990 - Sun Microsystems decided to develop special s/w that could be used to manipulate consumer electronic devices - A team of Sun Microsystems programmers headed by James Gosling was formed to undertake this task. 1991 - Team announced a new language named Oak 1992 - Team ( known as Green Project team by Sun), demonstrated the application of their new language. 1993 - WWW appeared on the Internet & transformed the text-based Internet into a graphical-rich environment. - Team came up with the idea of developing web applets. 1994 - The team developed a Web browser called HotJava to locate and run applet programs on Internet. 1995 - Oak renamed as Java 1996 - Java established itself not only as a leader for Internet programming but also as a general purpose, Object oriented programming language. 3

Major Release Versions of Java Major release versions of Java, along with their release dates: JDK 1.0 (January 23, 1996) JDK 1.1 (February 19, 1997) J2SE 1.2 (December 8, 1998) J2SE 1.3 (May 8, 2000) J2SE 1.4 (February 6, 2002) J2SE 5.0 (September 30, 2004) Java SE 6 (December 11, 2006) Java SE 7 (July 28, 2011) Java SE 8 (March 18, 2014, updated version on October 14, 2014) 4

5

Java Buzzwords / Features of Java Compiled & Interpreted Platform-Independent / Architectural Neutral Portable Simple, Familiar and Small Secure Object-oriented Robust Multi-threaded & Interactive Automatic Memory Management High Performance Distributed Dynamic Binding Extensible Write Once, Run Anywhere Network-Centric Programming Programmer Efficiency and Time-to-Market 6

Java Program Structure 7

Java: Data Types There are two data types available in Java: Primitive / Basic Data Types Reference / Object Data Types Primitive data types are predefined by the language and named by a keyword. Data Type Memory Space Range Default Value byte 8-bits -128 to +127 0 short 2 bytes -32,768 to +32,767 0 int 4 bytes -2147483648 to + 2147483647 0 long 8 bytes -2 63 to 2 63-1 (-9,223,372,036,854,775,808 to +9,223,372,036,854,775,807 ) float 4 bytes 3.4e 038 to 3.4e+038 0.0f double 8 bytes 1.7e 308 to 1.7e+308 0.0d boolean 1 bit True / False false Char 2 bytes '\u0000' (or 0) to '\uffff' (or 65,535 ) \u0000' [null] 0L 8

Java: Data Types Reference Data Types: Reference variables are created using defined constructors of the classes. They are used to access objects. These variables are declared to be of a specific type that cannot be changed. Class objects, and various type of array variables come under reference data type. Default value of any reference variable is null. A reference variable can be used to refer to any object of the declared type or any compatible type. Example: Scanner s = new Scanner(System.in); 9

Java: Operators Operator is an entity, which perform some operations on operands. We categorized the operator in two categories: According to their Nature. According to their Functionality. According to their Nature: Operator Description Example Unary Operator which take single operand ++, --, - (unary minus) Binary Operator which take two operands +, -, >, ==, && etc. Ternary Operator which take three operands?, : 10

Java: Operators According to their Functionality: Operator Arithmetic +, -, *, /, % Relational >, >=, <, <=,!=, == Increment/Decement ++, -- Logical &&,,! Conditional?, : Assignment =, *=, +=, -=, /=, &= etc. Bitwise ~, &,!, ^ Bit-Shift >>, <<, >>> Other/Special (), [ ],., new, instanceof, (type) 11