GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  J2EE  >  Core Java
Go To First  |  Previous Question  |  Next Question 
 Core Java  |  Question 494 of 502    Print  
Supplying Arguments to Main Method
What is the meaning of supplying string[] args to main method?



  
Total Answers and Comments: 1 Last Update: December 06, 2008     Asked by: murali_06 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: dugulam
 
public static void main(String args[])
This array of Strings is the mechanism through which the runtime system passes information to your application. Each String in the array is called a command line argument. Command line arguments let users affect the operation of the application without recompiling it. For example, a sorting program might allow the user to specify that the data be sorted in descending order with this command line argument:
-descending


Above answer was rated as good by the following members:
robbywillz, sonalgauravmahajan, ae8166558de88
December 06, 2008 06:06:36   #1  
dugulam Member Since: April 2007   Contribution: 2    

RE: Supplying Arguments to Main Method
public static void main(String args[])
This array of Strings is the mechanism through which the runtime system passes information to your application. Each String in the array is called a command line argument. Command line arguments let users affect the operation of the application without recompiling it. For example a sorting program might allow the user to specify that the data be sorted in descending order with this command line argument:
-descending

 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    

 Related Questions

Will there be a performance penalty if you make a method synchronized? If so, can you make any design changes to improve the performance

Latest Answer : yes a method can be static and synchronized ...

When you have an object passed to a method and when the object is reassigned to a different one, then is the original reference lost

Can we declare multiple main() methods in multiple classes.ie can we have each main method in its class in our program?

br />1.what is oracle.2.what is major differenece oracle8i and oracle9i.4.tell me some thing ur self.5.please tell me about oops.6.what is single inheritance.7.what is multiple inheritance.8.can java support 
Latest Answer : 8.can java support multiple inheritance.java support multiple inheritance for interfaces not fro classes25.what is difference between procedure and functions.function returns only one value where as procedure returns more than one value ...
Read Answers (11) | Asked by : rajjava

Latest Answer : No a Class, Method cannot be Garbage collected simply because a class or Method does not have physical exestence in memory and garbage collector is only used for freeing up the memory which only applies to objects not classes or methods.So only objects ...
Read Answers (5) | Asked by : chandu

Latest Answer : Private protected methods can be overloaded and overrided. But while overrding method following rules must be satisfied We can not narrow the accessibility but can be widen. Means if the access specifier is suppose protected then you can keep it protected ...
Read Answers (2) | Asked by : chandu

I need some more information about interface. For Example there is no any functionality inside the method which is declared in any interface. Then why i want to implement that interface to my class. 2. Statement is an interface. When i say stmt.executeQuery(). I am getting the records in my ResultSet. How it is possible?.. since there is no functionality insid the methods which is declared in Statement Interface. What is happning here?
An idea 

What is the difference between putting a class as abstract or if any of method in class is declared as abstract diference of these two while extending these two types of classes
Read Answers (1) | Asked by : karunakar
Tags : Abstract

Why java does not support inheritance of multiple superclasses?what is achieved by inheritance?why there is no main method in servlets/jsps?
Read Answers (10) | Asked by : manoj raut


 Sponsored Links

 
Related Articles

Service Oriented Java Business Integration Review

Service Oriented Java Business Integration Review Introduction If you ve read through the texts which give you an introduction to SOA or Web Services you will often find them to be quite frustrating and the reason for this is because they spend too much time referencing business processes which are
 

Java and Client Server Models

Java and Client Server Models The Role of Client Servers on the Web Client server models provide the essential mechanisms for working with the Internet In fact most of the World Wide Web is built according to this paradigm In client server models the web browsers run by millions of users are the cli
 

What is Common Data Modeling Method

Common Data Modeling is one of the core considerations when setting up a business data warehouse. Any serious company wanting to have a data warehouse will have to be first serious about data models. Building a data model takes time and it is not unusual for companies to spend two to five years just
 

How is the main() function declared?

The declaration of main can be done as int main() One more declaration that can be taken by main is command line arguments form int main(int argc, char *argv[]) or this can also be written as int main(argc, argv) int argc; char *argv[]; NOTE: It is not possible for one to declare the main
 

What happens when a variable is not initialized in main function?

When a variable is not initialized in main function it contains garbage value. This can be well seen from the example below main() { int x; printf(“%d”,x); z= sample() } sample() { printf(“Testing program”); } Output is   &n
 

How to define command line arguments

The main functions can have arguments passed which are called as command line arguments. There are two command line arguments: Argument count denoted by argc and Argument vector denoted by argv The argc is an integer variable which denotes the number of parameters passed and argv is pointer to a
 

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

JavaScript Window Object Open Method Part 2

JavaScript Window Object Open Method Part 2 In this JavaScript tutorial you will learn about JavaScript Window Object Open Method features of window object open method scrollbars status titlebar toolbar top width innerHeight innerWidth outerHeight outerWidth and hotkeys mosgoogle center scrollbars S
 

JavaScript Window Object Open Method

JavaScript Window Object Open Method In this JavaScript tutorial you will learn about JavaScript Window Object Open Method features of window object open method channelmode directories dependent fullscreen screenX screenY height left location menubar resizable alwaysLowered alwaysRaised mosgoogle ce
 

About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape