943,774 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Marked Solved
  • Views: 8048
  • Java RSS
You are currently viewing page 3 of this multi-page discussion thread; Jump to the first page
Sep 8th, 2007
0

Re: Else If statement

Click to Expand / Collapse  Quote originally posted by upstream ...
cool, i suggest you do advance reading. so you can learn the basic structures and rules in java programming, we can't really rely much on our instructors cuz they dont care much about the important facts in programming, they just dump the code right into us (not to mention, most teacher only knows theory :p)...and explain less. im a senior college student too in the philippines, so i know that...goodluck in your studies ^^
thx for the tip! I'll do that. =)
Reputation Points: 7
Solved Threads: 0
Light Poster
rapperhuj is offline Offline
40 posts
since Apr 2007
Sep 9th, 2007
0

Re: Else If statement

try to run this coding it will run
-------------------------------------



import java.io.*;
class input
{
public static void main( String args[])
{
String name ;
int age;
int salary;
int a2;
String s1,a1;
BufferedReader br = new BufferedReader ( new InputStreamReader (System.in));
System.out.println( " enter your name " );
s1 = br.readLine();
System.out.println (" enter your age ");
a1 = br.readLine();
a2 = Integer.parseInt(a1);
if ( a2 < 18)
{
System.out.println ( " you are not eligble for vote");
} //System.out.println (s1);


catch(IOException ioe) {}


}
}
Reputation Points: 10
Solved Threads: 0
Newbie Poster
saifjob40 is offline Offline
3 posts
since Sep 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: Java - to Post on web
Next Thread in Java Forum Timeline: If else statements on compatibility, I'm so confused here?????





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC