Program structure Java program structure
Answers
Answered by
4
Hello there!
I'm Rajdeep...
A java program constitutes of data members and member methods,, which handle the data members. This is called encapsulation. First you have to include a package (if you need because the default package included is java.lang), then you have to declare the class, then you have to declare main method (if required) or instance variables. If you dont write the main method at first, you can introduce a Constructor to initialize the data members. After that define data members and finally write the main method to invoke the member methods(sometimes main method need not be declared).
Hope this helps...For any doubt,
Follow, post your question and message me in inbox.
Thanks!!
I'm Rajdeep...
A java program constitutes of data members and member methods,, which handle the data members. This is called encapsulation. First you have to include a package (if you need because the default package included is java.lang), then you have to declare the class, then you have to declare main method (if required) or instance variables. If you dont write the main method at first, you can introduce a Constructor to initialize the data members. After that define data members and finally write the main method to invoke the member methods(sometimes main method need not be declared).
Hope this helps...For any doubt,
Follow, post your question and message me in inbox.
Thanks!!
Answered by
0
Answer:
Explanation:x=10,y=20,z;
Similar questions
Social Sciences,
8 months ago
English,
8 months ago
History,
1 year ago
Physics,
1 year ago
Art,
1 year ago