I dont get 2/12

<PLEASE USE THE FOLLOWING TEMPLATE TO HELP YOU CREATE A GREAT POST!>

<Below this line, add a link to the EXACT exercise that you are stuck at.>

<In what way does your code behave incorrectly? Include ALL error messages.>

```

Replace this line with your code.

<do not remove the three backticks above>

What is it exactly that you don’t get?

Could you provide us with all the code in question as well?

public class DataTypes {
public static void main(String args) {
int a=7;

	System.out.println("int a");

}

}
1.
Type any whole number in between the parentheses of System.out.println();

int data types do not need to be typed within quotes, so you can avoid using quotes this time

the code and question is given please give the necessary answer

Hey.

System.out.println("int a");

Is the issue here.

If you would like to print the value of a variable - in this case it’s a - you need only have to include just the variable name a because…

  1. a already defined as an integer
  2. Anything in between double quotes is going to be represented as a string regardless of what you put in it. (There are some exceptions to this)

In saying that, the questions asks you to put a whole number in the System.out.println parentheses. I’m not sure if placing an int variable will do the same thing but if not then try placing a number directly instead.

e.g.

System.out.println(77);

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.