Computer Science, asked by pushpavani9959, 1 month ago

class Test{ int x=10; Public static void main(String[]args) System.out.println(x):}}​

Answers

Answered by CoolorFoolSRS
3

It wont work.

You have to type:

import System;

class Test {

int x = 10;

public static void main(String[] args) {

 Test testVar = new Test(); // Replace testVar with your own variable.

 System.out.println(testVar.x);

}

}

Similar questions