A variable on our screen

  • 1
  • Locked
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.
You can't complete this task, because you're not signed in.
Comments (35)
  • Popular
  • New
  • Old
You must be signed in
Ankita SabnisLevel 2 , Mumbai
16 June, 12:16
how to get output? there is no option of getting output of program..
bsLevel 3 , Kuala Lumpur
16 April, 14:23
yes
Saksham JosjiLevel 1 , Mumbai
25 February, 09:21
String name = hijack;//write your code here System.out.printIn("name"); WHAT IS WRONG IN THIS?
AlexLevel 41
25 February, 11:55
Please read this lesson carefully.
AibohphobiaLevel 1 , Fort Campbell
25 March, 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
Beautiful Active DedicatedLevel 4 , Arlington, TX
16 April, 04:21
you just told him to add ; lol
NirmaLevel 2 , Bangalore
24 February, 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?
RomanLevel 41
25 February, 07:36
ruhLevel 2 , Indore
16 February, 06:48
why the code is not execute??
RomanLevel 41
18 February, 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.
Sri Vidya SrinuLevel 1 , Hyderabad
17 December 2018, 18:32
i am getting compiler errors for this.
package com.codegym.task.task01.task0110;

/*
A variable on our screen

*/

public class Solution {
    public static void main(String[] args) {
        //write your code here
        String s = "name";
        System.out.println(s);

    }
RomanLevel 41
18 December 2018, 07:59
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.
divyanimmalaLevel 1 , Siddipet
11 May, 11:02
you need to assign String name to name it self like String name="code"; System.out.println(name);
medLevel 1 , Rabat
4 November 2018, 01:40
how to open this level
RomanLevel 41
5 November 2018, 06:25
Try to open this link first - https://codegym.cc/quests/lectures/questsyntax.level01.lecture03
Memoona ArifLevel 1 , Karachi
18 October 2018, 16:42
String name="I'm diego"; system.out.println(name); what is wrong with this code ?
RomanLevel 41
19 October 2018, 06:14
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.
Vartaman IngoleLevel 6 , Wardha
28 October 2018, 07:53
system.out.println(name); Memoona Arif, please use System in place of system
sabareesh vaddiLevel 1 , Mumbai
17 October 2018, 11:23
String name = "sabareesh"; System.out.println(name); what is wrong in this?
RomanLevel 41
18 October 2018, 06:12
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.
ankita Level 4 , Pune
27 September 2018, 06:06
String name="abc"; System.out.println(" "+name); What should be the value of variable??
RanjeetLevel 4 , Bangalore
14 December 2018, 19:49
abc