Total members 11890 |It is currently Wed Apr 24, 2024 12:00 pm Login / Join Codemiles

Java

C/C++

PHP

C#

HTML

CSS

ASP

Javascript

JQuery

AJAX

XSD

Python

Matlab

R Scripts

Weka





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




_________________
M. S. Rakha, Ph.D.
Queen's University
Canada


Author:
Mastermind
User avatar Posts: 2715
Have thanks: 74 time
Post new topic Reply to topic  [ 1 post ] 

  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     -  
 Using FTP in java     -  
 what is java     -  
 Java course     -  
 What is Java API?!!!     -  



Topic Tags

Java Basics
cron





Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
All copyrights reserved to codemiles.com 2007-2011
mileX v1.0 designed by codemiles team
Codemiles.com is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to Amazon.com