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...

why we write public static void main (String args[])
in core java plz explain briefly??????????????????

Answer Posted / anand kumar jha

we write public because it can be called from outside the envornment and as we know that by using public keyword we will be able to access all the codes from outside,static is used because the JVM(java virtual machine which is also called as the interpreter calles the main function when there is no declaration of class instances so if we dont use static then the interprter will not check for it ,we use string and its a kind of class.It is also known as the commad line argument.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the exact difference in between unicast and multicast object? Where we will use?

953


What is a classloader in java?

972


Mention some features of java?

928


How to pass arraylist to stored procedure in java?

1082


Why are the destructors for base class and derived class called in reverse order when the program exits

2144


What is callablestatement? How you can call stored procedure to pass in parameter?

995


How a string is stored in memory?

973


Differentiate between run time error and syntax error.

1079


How do you implement tree mirroring in java?

1032


Is java pass by value or pass by reference?

941


Is it compulsory for a try block to be followed by a catch block in java for exception handling?

969


Does java set allow duplicates?

1036


worst case complexities of Quick sort and Merge sort.

961


What is the declaration statement?

898


Make a data structure and implement an algorithm to print all the files in a directory. (The root directory can have sub-directories too.)

1296