Rohit Sidana wrote:Hii.....Today one of my friend asked me that tell me whether Java is a object oriented language or purely object oriented language.....I gave a straight away answer that it is purely object oriented language...then he started laughing and told me not to give such a straight away answer think just upon that...So guys please tell me whether i was right or wrong?
you are right java is pure oo language because everything in java goes under class including the main() method but this is not the case with c++ in c++ we write main() method outside the classes which we have declared above
like
so here if we romove class then it is similar to c language
but in java this not true a main() method has to come in a class and that class name should be the name of your file
hope this helps
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Stay Hungry Stay Foolish