Switch to full style
Java2 codes,problems ,discussions and solutions are here
Post a reply

java statements

Tue Jan 27, 2009 11:42 pm

Java statements :
statement is like expression which include invoking computing and and evacuation's. But it is finished with semicolon ";".

Examples about Java Statement :


Example1:
java code
String myaddres="Str";
String address="St44r";
myaddress=address;

Assign string to another string variable

Example2 :

Code:
int i=1;
i++; or ++i; 

prefix and suffix increment statements .

Example3 :
Code:
// Create a object and call function
Shape sh=new Shape();
myobj.printall();

call a printall function

Example4 :
Code:
MyClass myobj=new MyClass();

Object creation statement
[u]

Statements types


    There are two types of statements .
  1. declaration statements

    java code
    Javaclass myobj=new Javaclass();

  2. control flow statements

    if condition,for loop, while loop and switch statements




Post a reply
  Related Posts  to : java statements
 For statement without all three statements     -  
 translate XQuery to SQL statements     -  
 DML Statements, insert row, delete row     -  
 Types of Databases and statements, Create, Alter, delete     -  
 DDL Statements-Adding Constraints-CREATE-ALTER-TABLE     -  
 2d game in java-Monster-Java 2D Game Graphics and Animation     -  
 java or .net     -  
 need help in java     -  
 Using FTP in java     -  
 what is java     -  

Topic Tags

Java Basics