Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

can we write program without class

Answer Posted / ashok reddy

2 ans for this question.

1.in a class class name and the constructor is must. so we cant write a file without class.(for this reason only the compiler adds a default constructor)

2.dont write anything inside a text doc(Empty text doc) and save this file as somename.java. it is possible to compile this file but it doesnot produce any .class file.

Is This Answer Correct ?    14 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does java final mean?

962


What is io stream in java?

970


What is collection api?

995


Explain yield() method in thread class ?

1002


What is the difference between serializable and externalizable interface?

1031


What does yield method of the thread class do?

972


Explain different forms of polymorphism?

1095


Can you use abstract and final both with a method?

1009


What state does a thread enter when it terminates its processing in java programming?

976


Can an interface have a class?

946


What is java instanceof operator?

984


What does the three dot emoji mean?

1050


Difference between doublesummarystatistics, intsummarystatistics and longsummarystatistics ?

939


When we should use serialization?

963


What are loops in java? What are three types of loops?

982