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

Is hashset sorted in java?

660


Which oo concept is achieved by using overloading and overriding?

532


What is a package in java? List down various advantages of packages.

753


How to run a JAR file through command prompt?

712


Can we nested try statements in java?

618






Can a class extend 2 classes in java?

554


What is an interface in java? Explain

572


List some important features of java 10 release?

511


What is meant by 'Class access modifiers'?

550


Explain different forms of polymorphism?

650


What is a singleton in genetics?

560


What is module in oop?

567


Why main function is static?

665


Can inner class be public in java?

548


What is the difference in between cpp and java? Can u explain in detail?

603