This program will show how to used system.out.print to show a message or output of the program.
this is used to show ther output in screen.
here is a sample program.
import java.io.*;
public class sampleprogram
{
public static void main(String args[])
{
System.out.println("Hello World");
System.out.println("I am Jaypee Cezar");
System.out.println("I am a programmer");
System.out.print("I hope you learn in my blog");
}
}
here is the output :
Hello World
I am Jaypee Cezar
I am a programmer
I hope you learn in blog
Showing posts with label display hello world. Show all posts
Showing posts with label display hello world. Show all posts
Saturday, July 10, 2010
Sunday, April 18, 2010
String in Java
he String class represents character strings. All string literals in Java programs, such as "abc", are implemented as instances of this class.
Strings are constant; their values cannot be changed after they are created. String buffers support mutable strings. Because String objects are immutable they can be shared. For example:
String str = "abc";
sample program.
import java.io.*;
public class stringsample
{
public static void main(String args[])
{
System.out.print("Hello World");
System.out.print("Welcome to my String Java program");
}
}
Labels:
display hello world,
hello world,
java,
String in java
Subscribe to:
Posts (Atom)