Computer Science, asked by ayaansiddiqui56, 4 months ago

Trace the error in the given program
Explain error with lineno.
Public class Java program {Il Line 1
Public static void main I Line 2
002
int a = sill Line 3
printin ("value of a="ta) / Line y
System,
out​

Answers

Answered by Anonymous
8

Actually that 'void', is meant to be written as a value type that you want the output of. Generally, in a user created function, we ask to return a specific value of a certain type, and   that value type is to be placed in place of 'void'.

'main' is just written to state that this is the main function of the program. It can be replaced by any word except for the reserved words.

'static' has to be typed if you want that function to be executed directly, i.e., in BlueJ, just by right clicking the class and selecting that function.

Answered by AtharvaDisha
17

Answer:

Error in Line y

It's System.out.println

Similar questions