+ 1

Why we use class in the program??what does class do?

18th Jan 2018, 10:03 AM
Harsh Agrawal
Harsh Agrawal - avatar
4 Answers
+ 1
classes are used for the OOP (Object oriented programming), using OOP you just write the code 1 time and call It when need It, and you're not repeating the code everytime you need It. Example: Myclass hi = new Myclass(); System.out.print(hi.sayhello); //output Hello World.
18th Jan 2018, 10:13 AM
Jordi sarrato
Jordi sarrato - avatar
0
give ur answer in scientific language and only in 2 lines????
18th Jan 2018, 10:39 AM
Harsh Agrawal
Harsh Agrawal - avatar