can we write program without class

Answer Posted / bhargavi rani

no.becoz java is pure object oriented language.so all the
member functions and datamembers must be write inside the
class.here we can also say that class is an example for
encapsulation.encapsulation is binding data and member
functions in a single unit.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is main method?

797


why doesn't java run on all platforms?

805


Can we initialize the final blank variable?

841


What is the difference between static class and normal class?

772


How to Sort Strings which are given in List and display in ascending order without using java api.

4121


Difference between static synchronization vs. Instance synchronization?

854


Explain serialization and deserialization in java?

802


How many types of keywords are there?

782


How many types of constructors are used in java?

834


What is prime number in java?

781


Why does it take so much time to access an applet having swing components the first time?

1715


Difference between string s= new string (); and string s = "abv";?

1010


Can I declare a class as private?

851


What is the difference between JVM and JRE?

845


Explain wait(), notify() and notifyall() methods of object class ?

835