+ 1
How can I fix this code? How do I code 2 methods in one class? Just look at the code that I did...
How can I fix this code? How do I code 2 methods in one class? Just look at the code that I did... https://code.sololearn.com/cp4702HNczEx/?ref=app
4 Answers
+ 2
your code has some braces problems. corrected version :
import java.util.Scanner;
public class Program
{
public static void main(String[] args) {
hoho();
line();
}
public static void hoho(){
Scanner lolo= new Scanner (System.in);
for(int x= lolo.nextInt();x<100 + 1; x++)
{
System.out.println (x);
}
}
public static void line(){
System.out.println("this row of numbers start at the number you chose and riches to a hundred.");
}
}
+ 1
Your code is fine now having braces issues
https://code.sololearn.com/ciEinq19Qsid/?ref=app
+ 1
John Robotane thank you!!!!!!!
0