d2jsp
Log InRegister
d2jsp Forums > Off-Topic > Computers & IT > Programming & Development > Prob Easy Java Error > Help Please
Add Reply New Topic New Poll
Member
Posts: 22,354
Joined: Jul 28 2007
Gold: 1,539.00
Sep 27 2013 02:23pm
import java.util.Scanner;
public class PartB

{

public static void main(String[] args)
{

int fullValue;
int value1;
int value2;
int value3;
int value4;

Scanner in = new Scanner(System.in);

System.out.println("Enter a whole number with 4 digits");
fullValue = in.nextInt();
value1 = fullValue / 1000;

value2 = (fullValue - (value1 = 1000));
value2 = value2 / 100;

value3 = ((value1 * 1000) + (value2 * 100));
value3 = (fullValue - value3) / 10;

value4 = ((value1 * 1000) + (value2 * 100) + (value3 * 10));
value4 = (fullValue - value4) / 1;
System.out.print1n(value1 + " " + value2 + " " + value3 + " " + value4);

}
}

1 error found:
File: C:\Users\James\Documents\sheridan\PartB.java [line: 29]
Error: cannot find symbol
symbol: method print1n(java.lang.String)
location: variable out of type java.io.PrintStream

thats the error message literally on the last outprint line
not sure what the problem is
Member
Posts: 22,354
Joined: Jul 28 2007
Gold: 1,539.00
Sep 27 2013 02:31pm
nvm im dumb
found the error
was a number 1 not a l
hahah
Member
Posts: 17,856
Joined: Apr 4 2012
Gold: 59.31
Sep 29 2013 01:06am
yeah seemed easy fix on that error.! good job
Member
Posts: 5,988
Joined: May 6 2006
Gold: 30.00
Sep 30 2013 11:02am
What IDE ar eyou using?
Go Back To Programming & Development Topic List
Add Reply New Topic New Poll