A beginning Java programmer first learns to declare (variables), assign (values to variables), and display (variables and values). In this task, we will practice all three basic skills. Create a String variable, assign a value, and then display it.
A variable on our screen
- 1
Comments (40)
- Popular
- New
- Old
You must be signed in to leave a comment
Charles Mullin
10 May 2020, 04:54
saks - remove the qoutes
0
Richard Morris
30 January 2020, 18:20
super
0
julia Suchi
8 October 2019, 18:07
/* Comment has been deleted */
0
Roman
9 October 2019, 06:28
Posting the solution in the comments is prohibited.
0
Oana rOBU
19 August 2019, 10:48
/* Comment has been deleted */
0
Roman
9 October 2019, 06:29
Posting the solution in the comments is prohibited.
0
Saba
27 July 2019, 21:26
I'm enjoying ho-hoooo
0
Ankita Sabnis
16 June 2019, 12:16
how to get output? there is no option of getting output of program..
0
Sean Nigito
13 July 2020, 18:49
you could println to get the desired output
+1
bs
16 April 2019, 14:23
yes
0
Saksham Joshi
25 February 2019, 09:21
String name = hijack;//write your code here
System.out.printIn("name");
WHAT IS WRONG IN THIS?
0
Alex
25 February 2019, 11:55
Please read this lesson carefully.
0
Aibohphobia
25 March 2019, 01:22
Saksham,
1. Always put ";" on the end of your line(s), think of it as a ".";
2. You do not need the "" on line 2;
3. You do need the "" on line 1;
Screen output: hijack//write your code here
Addendum: since "//" is for "remarks" it may actually ignore everything after the // as a comment.
You may find it easier to get in the habit of starting on code line #11, directly under:
//write your code here
As not to get your work mixed in with it; hope this helps
0
Beautiful Active Dedicated
16 April 2019, 04:21
you just told him to add ; lol
+1
Nirma
24 February 2019, 12:37
How to unlock it?
"To access the task, you need to unlock the lesson that contains it."
Which lesson contain it,how 'll i know?
0
Roman
25 February 2019, 07:36
This one.
0
ruh
16 February 2019, 06:48
why the code is not execute??
0
Roman
18 February 2019, 06:43
If you need help, something isn't right in your code, the server won't accept your solution (even if you are 100% sure that it is correct). Describe your question/issue in the HELP section at codegym.cc/help.
0