DEFINITION Java IDE created by Xinox Software JCreator is a powerful interactive development environment (IDE) for Java technologies. A Java compiler.

Slides:



Advertisements
Similar presentations
CS0007: Introduction to Computer Programming Console Output, Variables, Literals, and Introduction to Type.
Advertisements

IT151: Introduction to Programming
LESSON 3 - Identifiers JAVA PROGRAMMING. Identifiers All the Java components —classes, variables, and methods— need names. In Java these names are called.
Introduction to Programming with Java, for Beginners Primitive Types Expressions Statements Variables Strings.
CMT Programming Software Applications
Variables, Data Types, & Arithmetic Expressions CSC 1401: Introduction to Programming with Java Lecture 3 Wanda M. Kunkle.
Introduction to Computers and Programming - Class 2 1 Introduction to Computers and Programming Class 2 Introduction to C Professor Avi Rosenfeld.
Java An introduction. Example 1 public class Example1 { public static void main (String [] args) { System.out.println (“This is the first example”); int.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Adrian Ilie COMP 14 Introduction to Programming Adrian Ilie June 27, 2005.
Mini-Pascal Compiling Mini-Pascal (MPC) language
Slides prepared by Rose Williams, Binghamton University Chapter 1 Getting Started 1.3 The Class String.
String Escape Sequences
Chapter 2 Programming Building Blocks — Java Basics.
Introduction to Programming Prof. Rommel Anthony Palomino Department of Computer Science and Information Technology Spring 2011.
Comments are for people Header comments supply basic information about the artifact.
INTRODUCTION TO JAVA CHAPTER 1 1. WHAT IS JAVA ? Java is a programming language and computing platform first released by Sun Microsystems in The.
Introduction to Java Thanks to Dan Lunney (SHS). Java Basics File names The “main” method Output to screen Escape Sequence – Special Characters format()
CSC204 – Programming I Lecture 4 August 28, 2002.
CSE 1301 Lecture 2 Data Types Figures from Lewis, “C# Software Solutions”, Addison Wesley Richard Gesick.
Input, Output, and Processing
Basic Java Syntax CSE301 University of Sunderland Harry R Erwin, PhD.
JAVA Tokens. Introduction A token is an individual element in a program. More than one token can appear in a single line separated by white spaces.
Intro and Review Welcome to Java. Introduction Java application programming Use tools from the JDK to compile and run programs. Videos at
Classes CS 21a: Introduction to Computing I First Semester,
Chapter 2: Using Data.
Chapter 2: Java Fundamentals
Copyright © 2012 Pearson Education, Inc. Chapter 2: Introduction to C++
College Board A.P. Computer Science A Topics Program Design - Read and understand a problem's description, purpose, and goals. Procedural Constructs.
 Character set is a set of valid characters that a language can recognise.  A character represents any letter, digit or any other sign  Java uses the.
CHAPTER 4 GC 101 Data types. DATA TYPES  For all data, assign a name (identifier) and a data type  Data type tells compiler:  How much memory to allocate.
Programming Languages Machine language Assembly language High-level languages The Java language.
ECA 225 Applied Interactive Programming1 ECA 225 Applied Online Programming basics.
Chapter 2 Variables.
Documentation and Style. Documentation and Comments  Programs should be self-documenting.  Use meaningful variable names.  Use indentation and white.
A Simple Java Program //This program prints Welcome to Java! public class Welcome { public static void main(String[] args) { public static void main(String[]
Compiler Construction By: Muhammad Nadeem Edited By: M. Bilal Qureshi.
Types Chapter 2. C++ An Introduction to Computing, 3rd ed. 2 Objectives Observe types provided by C++ Literals of these types Explain syntax rules for.
1 Lexical Elements, Operators, and the C System. 2 Outline Characters and Lexical Elements Syntax Rules Comments Keywords Identifiers Constants String.
Java Basics. Tokens: 1.Keywords int test12 = 10, i; int TEst12 = 20; Int keyword is used to declare integer variables All Key words are lower case java.
1 Agenda  Unit 7: Introduction to Programming Using JavaScript T. Jumana Abu Shmais – AOU - Riyadh.
Java Programming: Guided Learning with Early Objects Chapter 1 Basic Elements of Java.
Fundamentals 2.
Chapter 1.2 Introduction to C++ Programming
Chapter 2 Variables.
Chapter 1.2 Introduction to C++ Programming
Chapter 1.2 Introduction to C++ Programming
Chapter 1.2 Introduction to C++ Programming
CSC201: Computer Programming
Identifiers - symbolic names
Lecture 2 Data Types Richard Gesick.
Chapter 2, Part I Introduction to C Programming
Identifiers - symbolic names
Section 3.2c Strings and Method Signatures
Data Types, Identifiers, and Expressions
Introduction to C++ Programming
Unit-1 Introduction to Java
Chapter 1: Computer Systems
T. Jumana Abu Shmais – AOU - Riyadh
CMSC 202 Java Primer 2.
Chapter 2: Java Fundamentals
elementary programming
Documentation and Style
Anatomy of a Java Program
Programming Building Blocks Java Basics
Chapter 2: Introduction to C++.
Unit 3: Variables in Java
Chap 2. Identifiers, Keywords, and Types
Chapter 2 Variables.
Lexical Elements & Operators
PYTHON - VARIABLES AND OPERATORS
Presentation transcript:

DEFINITION Java IDE created by Xinox Software JCreator is a powerful interactive development environment (IDE) for Java technologies. A Java compiler

TOKENS characters that are grouped into symbols

DIFFERENT TYPES OF TOKEN

SYNTAX characters and symbols and their structure used to code the class using Unicode characters.

IDENTIFIERS non keywords primarily they are used as names

LEGALILLEGAL 1.The first character of the identifier should start either with a letter, a currency character ( $ ), or a connecting character like underscore( _ ). 2.The first character maybe followed by either or a combination of letters, currency characters, connection characters, or numbers. 3.There is no limit of how many characters an identifier can contain. However, it's essentially recommended to use a short character identifier yet readable and understandable. 1.Identifiers that starts with a number. 2.Using Java keywords as an identifier is illegal. In other words, you can't use a Java keyword as an identifier Note: More importantly, keep in mind that Java Identifier are case sensitive. Thereby, NAME and name are two different identifiers.

Here are some hint on how to formulate identifier name: Classes & Interface - The first letter should be capitalized. If the desired name is composed of several words, the first letter of the inner word should be capitalized (camelCase). For example: Chair, InformationDepartment and HeadOffice. Methods - The first letter should be lowecase, and then camelCase rules should be applied. Also, take note that in method names should be verb-noun pairs. For example: getTotal, setContactNumber and buyCellphone.

Here are some hint on how to formulate Identifier name: Variables - same rules apply on letter case with methods. However, it should idially be a short and meaningful. For example: firstName, currentLocation and totalPrice. Constants - Java constants should be named using uppercase letters with underscore characters as separator. Take note that constants are created by marking variables as static and final. For example: PERSON_LABEL, HELLO_MESSAGE and GREETING.

LITERALS represent numbers A constant value which can be assigned to a variable E.g: int x=10, int x=010 STRING LITERALS of zero or more characters embedded in double quotes E.g: String s=” laxman scjp”;

OPERATORS + and = are used to express basic computation such as addition or String concatenation or assignment.

BLOCKS left and right braces ({ and }) body of a class

WHITESPACE such as spaces, tabs, and newlines separate tokens

COMMENTS /* text */ The compiler ignores everything from /* to */. /** documentation */ This indicates a documentation comment (doc comment, for short). // text The compiler ignores everything from // to the end of the line.