answersLogoWhite

0

import java.io.*;//package defined

//class name example

public class example{

//function name declare

public static void main(String str)

{

system.out.println("welcome to java world");

}

}

to run this program :-

1.setting the environmental variables

(including path c:/jdk1.3/bin/ in existing path)

not as like that what ever the path of bin you mention,specify correctly

2.in the command prompt

type javac

it display some thing

with out any error

3.

in the command prompt

>/javac example.java

4.

>/java example

User Avatar

Wiki User

17y ago

What else can I help you with?

Related Questions

What is JNI?

Java Native Interface JNI is an interface between java and applications and libraries written in other languages. As an example, JNI enables Java programs to use C libraries and also enables C programs to use Java classes.


What are the kinds of java programs?

the two types of java programs are Applet and application programs


Small Java-based programs are called?

Java applets


In order to write compile and execute java programs in my PC which software should i install?

Compilation (byte code conversion) and execution (interpretation) of JAVA programs requires a JAVA Compiler and a JAVA runtime. There are many JAVA development systems available, some free, some not free. Two vendors for the PC / Windows platform are Sun and Microsoft, but, again, there are others.


Does java script coding mean using it for Java programs only?

Java script coding is computer coding, many things require Java, and you need to have Java enabled to view these types of programs.


What are the uses of java database connectivity?

Java Database Connectivity, a Java API that enables Java programs to execute SQL statements. This allows Java programs to interact with any SQL-compliant database.


Do you have to have java on your coumpter to run everything on your coumpter?

No; lots of programs run without Java. You only need the Java runtime to run programs specifically designed with Java technology.


Difference between java applets from java application?

Java applets are programs which we can embed in a webpage. It will act from server to client machine. But java can be used to make stand alone programs also. These programs will include games, freewares and all.


What is the providence of US?

The JRE refers to Java Runtime Environment... JRE is an implementation of the Java Virtual Machine which actually executes Java programs. Without the JRE we cannot execute our Java programs.


What are some example for string formatting in Java?

There are lots of examples of string formatting in Java. It can be difficult at times. Some of these examples are, but are not limited to; align, string, format, and JAVA.


What is the best compiler can be used to create Java programs?

A Java compiler.


Which two kinds of programs can be written in java explain in brief?

the two types of programs that can be written in JAVA are:1. Stand alone programs- These are simple programs that are taught to Class X or Class XII students. for example, find factorial of a number. they basically work alone or under a limited environment.2. Applets- These are the programs that run on internet websites. All the java applications found on net are mainly applets.They provide multimedia support on websites.