Learn Java using simple tutorial

A forum to discuss Java programming related issues and concerns.
no avatar
tutorialspoint
Site Admin
 
Posts: 144
Joined: Fri Apr 27, 2007 6:52 pm

Learn Java using simple tutorial

by tutorialspoint » Thu Dec 17, 2009 7:34 pm

Dear visitors,

If you are new to Java or finding difficulty in learning Java technology then tutorialspoint is here to help you with their simple and practical tutorial:

http://www.tutorialspoint.com/java/index.htm


Leave you feedback for improvement.
Moderator, TP
Keep visiting and share this site with your friends.

no avatar
mmiteshh
 
Posts: 1
Joined: Tue Sep 04, 2012 5:08 pm
Location: India

HELP

by mmiteshh » Tue Sep 04, 2012 5:18 pm

Class Foozit {
public static void main(String args[]) {
Integer x=0;
Integer y=0;
for(short z=0;z<5;z++)
if((++x>2)||(++y>2))
x++;
System.out.println(x+ "" +y);
}
}


Its output is 8 2
Please anybody help me with the detailed step-wise information how the for and if loop is working here?
Thanks.
MIt

no avatar
hasibmujtaba
 
Posts: 1
Joined: Sat Sep 08, 2012 2:05 am
Location: India

Learn Java using simple tutorial

by hasibmujtaba » Sat Sep 08, 2012 2:16 am

Class Foozit {
public static void main(String args[]) {
Integer x=0;
Integer y=0;
for(short z=0;z<5;z++)
if((++x>2)||(++y>2))
// it is the speciality of short circuit OR operator '||' i.e. it checks the the left condition first ,if it is
// true then it does not check the right one .i.e. y is not incremented after 2 since the left one
// condition is true
x++;
System.out.println(x+ "" +y);
}
}


Its output is 8 2

no avatar
morph34a
 
Posts: 1
Joined: Wed Dec 19, 2012 12:37 pm
Location: Chandigarh

»JAVA Tutorials

by morph34a » Wed Dec 19, 2012 12:49 pm

Thanks for the useful java tutorials.

no avatar
justinbiber469
 
Posts: 1
Joined: Sat Jun 15, 2013 3:34 am

Re: Learn Java using simple tutorial

by justinbiber469 » Sat Jun 15, 2013 3:51 am

If you've never used an object-oriented programming language before, you'll need to learn a few basic concepts before you can begin writing any code. This lesson will introduce you to objects, classes, inheritance, interfaces, and packages. Each discussion focuses on how these concepts relate to the real world, while simultaneously providing an introduction to the syntax of the Java programming language..........
jasicajhon

Return to JAVA Lobby

cron