1
0

Hi, I can't finish this task. My programm prints everything according to the instructions, but still, I can't finish the task. Can anyone see, where do I have mistake? also i tried single and double quotations, still not working.

public class Solution
{
public static void main(String[] args)
{
System.out.println(""My name is Amigo.");
System.out.println("");
System.out.println("My salary for the first year will be $60,000");
System.out.println("My salary for the second year will be $80,000");
System.out.println("My salary for the third year will be $100,000");
System.out.println("My salary for the fourth year will be $120,000");
System.out.println("My salary for the fifth year will be $150,000");
System.out.println("");

System.out.println("Kiss my shiny metal ass!"");
}
}

asked 01 Mar '15, 17:54

Zain%20Mehar's gravatar image

Zain Mehar
12
accept rate: 0%

edited 02 Mar '15, 06:31

Diego%20Carleone's gravatar image

Diego Carleone ♦♦
765


You have extra quotes in 5 and 14 lines.

link

answered 02 Mar '15, 06:33

Kim%20Lee-Ling's gravatar image

Kim Lee-Ling ♦♦
564
accept rate: 50%

Remove double quote from starting of line 5 and ending of line 14 :)

link

answered 02 Mar '15, 06:54

Kishor%20Koli's gravatar image

Kishor Koli
1
accept rate: 0%

Green text is String which you want to print in console with operator System.out.println. You can see that in your programm all operators System.out.println is green. That is wrong.

For example.

System.out.println("I'm happy"); - It is print String "I'm happy" in console.

link

answered 04 Mar '15, 04:32

RabenokDmitry's gravatar image

RabenokDmitry
1263
accept rate: 14%

public class Solution { public static void main(String[] args) { //add the code here String a = "My name is Amigo."; System.out.println(a); System.out.println(""); System.out.println("My salary for the first year will be $60,000"); System.out.println("My salary for the second year will be $80,000"); System.out.println("My salary for the third year will be $100,000"); System.out.println("My salary for the fourth year will be $120,000"); System.out.println("My salary for fifth year will be $150,000"); System.out.println(""); System.out.println("Kiss my shiny metal ass!"); } } Where is my mistake?

link

answered 31 May, 01:52

Lena-0901's gravatar image

Lena-0901
1
accept rate: 0%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×7

Asked: 01 Mar '15, 17:54

Seen: 1,043 times

Last updated: 31 May, 01:52