answersLogoWhite

0


Best Answer

public class HaveAGoodDay {

public static void main(String[] args) {

for (final String arg : args){

System.out.print(arg +" ");

}

}

}

compile and run the program:

java HaveAGoodDay have a good day.

output:

have a good day.

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a java program to pass a string have a good day from command line?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you write and execute java program?

In theory, you can write a Java program in just about any text editor; then you can compile it with the "javac" command, and - if the compilation works without errors - run it with the "java" command. In practice, and especially for new programmers, I would recommend that you get a good Java IDE, which lets you do everything in a single environment, and clearly shows where there are errors, among other benefits.


How do you write and execute the java program?

In theory, you can write a Java program in just about any text editor; then you can compile it with the "javac" command, and - if the compilation works without errors - run it with the "java" command. In practice, and especially for new programmers, I would recommend that you get a good Java IDE, which lets you do everything in a single environment, and clearly shows where there are errors, among other benefits.


Can you use scanf to get a string to a c program?

Certainly. That's what sequence %s is good for.


How do you write a good program?

With lot of practice.


How do you capture the output of C program in to another C program?

HIYou can first include the 1st program in ur 2nd program using # include and then whatever be the output from frst it can be used in second program.pankajThat's what popen is good for. Read the manual.


How long do you go to college to be an author?

to become an author you just need to write and write, and have a good command of the language you want to write in.


Please write down your view after viewing YouTube program.?

its good


Write a c program to print roman letters?

good morning


How do you close a string literal?

Just as you have started it. good examples: 'string' "string" `string` »string« bad examples: 'string" "string` »string'


What are the feutures of a good c program?

c program is fast and efficient.And c programm can be write with vareity of type variables and operations.


Is it possible to write a program in Java and partly in C?

Yes, that's what JNI is good for.


What is program style?

Program style refers to the way you write a program code. A good style is usually characterized by proper indentation, meaningful variable names, etc.