can we write program without class

Answer Posted / mahipal

no,because java is purely object oriented language,so we can't create the objects with out writing a class.And also we can save the code as classname.java that's the reason also we must create a class

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Which software is used for java programming?

550


Why are getters and setters used?

567


Which package is used for pattern matching with regular expressions?

643


What is the purpose of the wait(), notify(), and notifyall() methods in java programming?

574


What is a byte string?

617






Can memory leak in java?

580


What does  mean in regex?

565


What does singleton class mean?

533


What is a blocking method in Java?

601


Explain the difference between comparator and comparable in java?

484


Can we inherit a class with private constructor?

566


Can we extend immutable class?

529


What are keywords and reserved words in java?

553


What is linked hashset and its features?

543


What is the use of static methods?

583