GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Tech FAQs  >  Programming  >  Java
Go To First  |  Previous Question  |  Next Question 
 Java  |  Question 868 of 873    Print  
Print Command Line Arguments
How to print Command Line Arguments without using IO Classes?


  
Total Answers and Comments: 1 Last Update: June 20, 2008     Asked by: nv_krishna 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
June 20, 2008 04:05:49   #1  
aswinikalapeeti Member Since: June 2008   Contribution: 1    

RE: Print Command Line Arguments

you can print command line arguments, by giving what to print while executing java program.the code for this is

class Demo
{
                 public static void main(String args[])

                   {
                          for(int i=0;i<args.length;i++)
                          {
                                  System.out.print("    "  + args[i]);
                            }
                    }                  
}



compiling the above program,

javac  Demo.java

executing the above program,

java Demo hello good morning


output is as follows

hello good morning


 
Is this answer useful? Yes | No

 Related Questions

Latest Answer :  In c,there are argc and argv.argc is passed to argv and argv is used to store characters.in java there is only args.we pass a String value to it. ...

Latest Answer : if we want give information at runtime we use comand line args. ...

Latest Answer : java -version ...

How we print the contents on a[][].If the a[][] is filled with some elements.but the y dont specifiy the sizes of two dimensions arry?
Read Answers (1) | Asked by : ramakrishna

public: public keyword is an access speciferstatic :allows main to be call without any instance of a timevoid: does not return any valuemain: main() is the method where java Applications beginSting args[] 
View Question | Asked by : nirmala

Latest Answer : The arguments are passed by value. ...

Which of the option correctly describes the comments in java1) // -- single line comment2) /* --*/ multiple line comment 3) /** --*/ documentation
A) 1, 2B) 2, 3C) 3, 1D) 1, 2, 3 

A) A servlet can handle multiple requests concurrently, and can synchronize requests. This allows servlets to support systems such as on-line conferencing.B) Servlets can forward requests to other servers 
Latest Answer : Answer : A) ...

A) One B) Two C) ThreeD) Four Explanation: There are 3 types of comments namely Single-line, Multi-line and Documentation comment  
Latest Answer : what is the syntax of doc comment ? i was thinking only 2 types of comments ...

The print( ) method is just like println( ), except that it does not output a newline character after each call
A) TrueB) False 


 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
 

Print Servers

Print Servers Print server is a server or advice that is used to connect many printers of a network to it Using the print server any computer on the network can give a print command to the server and the print server will get the job done accordingly Usually a print server is configured on a compute
 

Concepts of Object-Oriented Programming

Object Oriented JavaScript In this chapter you ll learn about OOP Object Oriented Programming and how it relates to JavaScript As an ASP NET developer you probably have some experience working with objects and you may even be familiar with concepts such as inheritance However unless you re already a
 

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
 

On-Line Transaction Processing

On-Line Transaction Processing On-Line Transaction Processing is a processing that supports the daily business operations. Also know as operational processing and OLTP.&nbsp; An OLTP is a database which must typically allow the real-time processing of SQL transactions to support traditional reta
 

On-Line Analytical Processing

On-Line Analytical Processing On-Line Analytical Processing is a processing that supports the analysis of business trends and projections. It is also known as decision support processing and OLAP.&nbsp; An OLAP software enables companies to have real-time analysis of data stored in a database. A
 

What is the use of truncate command?

Truncate command will delete all records and the most important thing to make note of truncate command is since truncate command cannot be rolled back one must make sure to take proper backup of table data before performing the truncate command. Truncate command is thus used to remove all rows from
 

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
 

SQL Programming

SQL Programming Overview Anybody who has done something for a long time has probably wanted to change how things work at some point or another. A worker at a mill might have found a more efficient way of cutting logs, or a mathematics teacher might have had a hand in changing a school&rsquo;s al
 

WinRunner Programming Concepts

If you want to create WinRunner scripts that are highly efficient, there are important programming concepts that you will want to become familiar with. Understanding these concepts will provide you with a large number of key benefits. In addition to understanding these concepts, you must also learn
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape