0

Why i m not getting the output in the following program?

class student { void student() { System.out.println("const"); } } public static void main(String[] args) { student s1=new student(); student s2=new student(); student s3=new student(); s1.student(); s2.student(); s3.student(); } }

13th Jul 2021, 6:26 AM
Navin kumar
Navin kumar - avatar
4 ответов
+ 3
Navin kumar It is working after removing curly brace before the line of main method.
13th Jul 2021, 7:38 AM
A͢J
A͢J - avatar
+ 2
Remove the curly brace before the main method you have used an extra brace
13th Jul 2021, 6:37 AM
Parth Shendge
+ 2
I ᴀᴍ "Tɪᴍᴇ" Yes done thank u
13th Jul 2021, 8:21 AM
Navin kumar
Navin kumar - avatar
0
Parth Shendge still not working
13th Jul 2021, 6:47 AM
Navin kumar
Navin kumar - avatar