+ 2
Can you help me in Java / ممكن مساعدتي في برنامج الجافا
When I finish from writing a simple program, I write } //main }//class But, I don't now why use it. because, The program he will Work. Thank you for help me.❤️ عند انتهاء من كتابة برنامج معين في الاخير اكتب } //main } //Class ماهي وضيفتهم بالضبط لان عندما اكتبهم او احذفهم البرنامج يشتغل عادي وشكراً.
2 Answers
+ 2
Each open { needs a corresponding close } so:
public class Program
{
public static void main(String[] args) {
} // close the main method open brace
} // close the class Program open brace
While it might run without it, it is likely generating warnings you don't see and could become an error with some compilers. I suggest keeping them to save headaches later.
+ 2
Thank you ❤️