Friday, February 7, 2014

Printing Text in Java - Code Example

This post contains a java code that prints a few sentences.

import java.awt.JobAttributes;
import javax.swing.JOptionPane;

public class Main {
 public static void main(String argS[]) {
  System.out.println("Hello World!");
  System.out.print("Welcome to Java Programming!");
  System.out.println(" This is a line following above line!.");
  JOptionPane.showMessageDialog(null, "Welcome to \n Java Programming!");


No comments:

Post a Comment