...hello I'm a student and as a project. he ask us to make a mailbox of 1-200. and with this mailboxes the 1st task is to open all the even numbers.then the 2nd task is open the no.3 mailbox followed by next 3rd mailbox and so on. but the the problem is how can i open a closed mailbox and closed the open one...Hope to help me
I followed the tut to the letter, but I keep getting errors when I try to run it.
"The left-hand side of an assignment must be a variable
Syntax error, insert ")" to complete Expression
Syntax error, insert "AssignmentOperator Expression" to complete Expression
Syntax error, insert "Finally" to complete BlockStatements
at myProject.main(myProject.java:17)"
I'm using eclipse because a friend of mine recommended it though I doubt that has anything to do with the problems.
Does "import java.util.Scanner;" do the same work as "import java.io.*;" or why did the programmer below choose the latter ?
import java.io.*;
class AllEvenNum{
public static void main(String[] args) {
try{
BufferedReader br1 = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter number : ");
int num = Integer.parseInt(br1.readLine());
System.out.println("Even Numbers:");
for (int i=1;i <=num ; i++){
if(i%2==0 ){
System.out.print(i+",");
}
}
}
catch(Exception e){}
}
}
//thanks for yo help
ask a questionSheng July 7, 2011 at 2:16 PM
...hello I'm a student and as a project. he ask us to make a mailbox of 1-200. and with this mailboxes the 1st task is to open all the even numbers.then the 2nd task is open the no.3 mailbox followed by next 3rd mailbox and so on. but the the problem is how can i open a closed mailbox and closed the open one...Hope to help me
core java tutorialcore java t June 23, 2011 at 12:02 PM
core java tutorial
ErrorsNick Fifis June 30, 2011 at 10:45 PM
I followed the tut to the letter, but I keep getting errors when I try to run it. "The left-hand side of an assignment must be a variable Syntax error, insert ")" to complete Expression Syntax error, insert "AssignmentOperator Expression" to complete Expression Syntax error, insert "Finally" to complete BlockStatements at myProject.main(myProject.java:17)" I'm using eclipse because a friend of mine recommended it though I doubt that has anything to do with the problems.
Object Oriented ProgrammingSheryl Lubo September 21, 2011 at 11:39 AM
please help me in this subject...
Object-Oriented ProgrammingSheryl Lubo September 21, 2011 at 11:42 AM
please help me in my Program today....
javaEmmanuel October 2, 2011 at 1:22 PM
Try explain for us what try and catch exception meaan in java
javaphoebe mae caballero January 10, 2012 at 12:32 PM
i love this java topic
correctionvaibhav parikh January 29, 2012 at 10:06 AM
please correct above i/2=0,in theory description it should be i%2=0 as wriiten in program...thank u.
computer sciencedarwen March 6, 2012 at 10:24 AM
i want to know and i want to learn the cisco and how to ip add thats all thank you
error in codematthew May 2, 2012 at 9:15 AM
error line 6 ';' needed at the end of line.
java problemsycliff June 29, 2012 at 7:37 PM
Does "import java.util.Scanner;" do the same work as "import java.io.*;" or why did the programmer below choose the latter ? import java.io.*; class AllEvenNum{ public static void main(String[] args) { try{ BufferedReader br1 = new BufferedReader(new InputStreamReader(System.in)); System.out.println("Enter number : "); int num = Integer.parseInt(br1.readLine()); System.out.println("Even Numbers:"); for (int i=1;i <=num ; i++){ if(i%2==0 ){ System.out.print(i+","); } } } catch(Exception e){} } } //thanks for yo help
hhhhNorfaisa September 26, 2012 at 11:53 AM
programming is so very hard..promise
Java programsRajkumar M January 6, 2013 at 7:49 PM
Basic of a programs is a all people
Basic programsRajkumar M January 6, 2013 at 7:51 PM
Java programs all peoples reachied
WRITE A PROGRAM TO PRINT 8000TH PRIME NUMBERHARISH K R March 6, 2013 at 12:15 PM
HI FRIENDS I NEED A SOLUTION FOR FINDING 8000TH PRIME NUMBER
Post your Comment