I am taking a class on JAVA this semester and was given my first assignment this week. But I am getting an error and I can't figure out what is causing it.
here is my code:
public class ShowOperations
{
public static void main(String [] args)
{
System.out.prin tln("The total of 3 * 5 is " + (3 * 5) + '\n'
+ "The total of 7.1 * 8.3 - 2.2 is " + (7.1 * 8.3 - 2.2) + '\n'
+ "The total of 3.2 / (6.1 * 5) is " + (3.2 / (6.1 * 5)) + '\n'
+ "The total of 15 / 4 is " + (15 / 4) + '\n'
+ "The total of 15% of 4 is " + (15 % 4) + '\n'
+ "The total of 5 * 3 - (6 * 4) is " (5 * 3 - (6 * 4)) + '\n' );
}
}
The error is saying it was expecting a ')' before the last equation but it looks fine to me. All the '(' have closing ')'
am I making a noob mistake somewhere?
here is my code:
public class ShowOperations
{
public static void main(String [] args)
{
System.out.prin tln("The total of 3 * 5 is " + (3 * 5) + '\n'
+ "The total of 7.1 * 8.3 - 2.2 is " + (7.1 * 8.3 - 2.2) + '\n'
+ "The total of 3.2 / (6.1 * 5) is " + (3.2 / (6.1 * 5)) + '\n'
+ "The total of 15 / 4 is " + (15 / 4) + '\n'
+ "The total of 15% of 4 is " + (15 % 4) + '\n'
+ "The total of 5 * 3 - (6 * 4) is " (5 * 3 - (6 * 4)) + '\n' );
}
}
The error is saying it was expecting a ')' before the last equation but it looks fine to me. All the '(' have closing ')'
am I making a noob mistake somewhere?
Comment