Else If statement

Thread Solved
Reply

Join Date: Apr 2007
Posts: 40
Reputation: rapperhuj is an unknown quantity at this point 
Solved Threads: 0
rapperhuj rapperhuj is offline Offline
Light Poster

Re: Else If statement

 
0
  #21
Sep 8th, 2007
Originally Posted by upstream View Post
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. =)
Reply With Quote Quick reply to this message  
Join Date: Sep 2007
Posts: 3
Reputation: saifjob40 is an unknown quantity at this point 
Solved Threads: 0
saifjob40 saifjob40 is offline Offline
Newbie Poster

Re: Else If statement

 
0
  #22
Sep 9th, 2007
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) {}


}
}
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC