Display a String on the Console Window

From Java Example Source Code

Jump to: navigation, search

Contents

[edit] Overview - Display a String on the Console Window

This Java example program shows how to display a string on the console window by System.out.

[edit] Java Source Code

  • Package: example.output
  • File: OutputToConsole.java
package example.output;
 
public class OutputToConsole {
    public static void main(String[] args) {
	System.out.println("console");
    }
}

[edit] What Result You Can Get

Run the program, you will get:

console

[edit] Required External Libraries and/or Files for this Java Example

Need nothing.


[edit] How to Run this Java Example Program

We recommend running this Java example program with Eclipse.

For assistance in working with Eclipse, please see How to Run Java Program with Eclipse.

It's fairly easy.



[edit] Question & Answer

Any question?

Click edit and post your question or answer here.


Personal tools