0

How do I beat 2.2 Vehicle Passport in Java? It's been really hard and I can't figure it out.

I need help finishing this level. Can someone help

22nd Jul 2022, 2:18 PM
dabomb la
dabomb la - avatar
23 Réponses
- 1
Show us your code so we can see your attempt. If we have no code, we can't help you.
22nd Jul 2022, 6:37 PM
MyNameIsNotBob
MyNameIsNotBob - avatar
+ 6
In case you're not sure on how to show your code: Open it, then highlight all of it, copy. Leave the lesson (save if you want). Go to "create" tab or code... either way. Hit the + button and choose java. Paste your code. Save it. Return to here. Edit your post and attach the code. Someone can help you pretty quickly.
22nd Jul 2022, 8:05 PM
Ausgrindtube
Ausgrindtube - avatar
+ 2
dabomb la I would recommend resetting the code. You only need to fix the variable types using either String, int or double.
23rd Jul 2022, 7:26 PM
Ausgrindtube
Ausgrindtube - avatar
+ 1
What is your attempt so far?
22nd Jul 2022, 3:20 PM
Justice
Justice - avatar
+ 1
That's okay. Even if it wrong, just post your attempt so you can be guided to the correct answer.
22nd Jul 2022, 3:21 PM
Justice
Justice - avatar
+ 1
dabomb la You have to fix the class and the variable types. What is a String? What is Double what is Int?
23rd Jul 2022, 2:20 AM
Chris Coder
Chris Coder - avatar
+ 1
No worries I started programming when I was 10. Go back to lesson 2.1 and learn about variables.
23rd Jul 2022, 2:30 AM
Chris Coder
Chris Coder - avatar
+ 1
public class Program { public static void main(String[] args) { //fix the variable types String name = "Toyota"; Double engine = 4.7; int year = 2019; System.out.println("Name: " + name); System.out.println("Engine: " + engine); System.out.println("Year: " + year); } }
23rd Jul 2022, 8:44 PM
Maham Arshad Raja
0
I haven't learned much
22nd Jul 2022, 3:21 PM
dabomb la
dabomb la - avatar
0
But I've been trying
22nd Jul 2022, 3:21 PM
dabomb la
dabomb la - avatar
0
And all I get is "no output" and "no input"
22nd Jul 2022, 3:21 PM
dabomb la
dabomb la - avatar
0
Ok
22nd Jul 2022, 9:45 PM
dabomb la
dabomb la - avatar
0
Heres my code. It fails each time System.out.println("Name: ""Toyota" + name) System.out.println("Engine: ""4.7" + engine) System.out.println("Year: ""2019" + year) } } System.out.println(Name: ""Toyota" + name);
22nd Jul 2022, 9:46 PM
dabomb la
dabomb la - avatar
0
I'm waiting 😭😭😭😭😭
23rd Jul 2022, 1:26 AM
dabomb la
dabomb la - avatar
0
Sorry
23rd Jul 2022, 1:48 AM
MyNameIsNotBob
MyNameIsNotBob - avatar
0
No problem I was just starting to think y'all werent gonna answer
23rd Jul 2022, 1:50 AM
dabomb la
dabomb la - avatar
0
I don't know Java but I guess I'll learn today. I have solved it but I can't just give you the answer. Please copy and paste your entire code.
23rd Jul 2022, 2:10 AM
Chris Coder
Chris Coder - avatar
0
Correct code: System.out.println(“Name: “ + “Toyota” + name); System.out.println(“Engine: “ + “4.7” + engine); System.out.println(“Year: “ + “2019” + year } }
23rd Jul 2022, 2:12 AM
MyNameIsNotBob
MyNameIsNotBob - avatar
0
AJ 🇺🇦#PeaceForUkraine🇺🇦 that is not all of the code. Also you didn't close the last println();
23rd Jul 2022, 2:15 AM
Chris Coder
Chris Coder - avatar
0
Uh I'm 14 and very confused.. also I am just now starting to learn to program
23rd Jul 2022, 2:25 AM
dabomb la
dabomb la - avatar