Advertisements

Learn Java using simple tutorial

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

Offline
tutorialspoint
Site Admin
Posts: 143
Joined: Fri Apr 27, 2007 6:52 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.

HELP

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

Offline
mmiteshh
Posts: 1
Joined: Tue Sep 04, 2012 5:08 pm
Location: India
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

Learn Java using simple tutorial

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

Offline
hasibmujtaba
Posts: 1
Joined: Sat Sep 08, 2012 2:05 am
Location: India
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

┬╗JAVA Tutorials

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

Offline
morph34a
Posts: 1
Joined: Wed Dec 19, 2012 12:37 pm
Location: Chandigarh
Thanks for the useful java tutorials.

Re: Learn Java using simple tutorial

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

Offline
justinbiber469
Posts: 1
Joined: Sat Jun 15, 2013 3:34 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