8
Contributors
8
Replies
10
Views
10 Years
Discussion Span
Last Post by yasuodancez
0

Thanks for your prompt reply, but can you give me some code how i go about it?
give me a small java prg for adding 2 numbers and code for developing .exe.

Thanks a lot

-1
import java.io.*;
class add
{
	public static void main(String arg[])
	{
		float c,a,b;
		try
		{	
			DataInputStream x=new DataInputStream(System.in);
			System.out.println("Enter two numbers");
			a=Float.parseFloat(x.readLine());
			b=Float.parseFloat(x.readLine());
			c=a+b;
			System.out.println("sum="+c);
		}
		catch(Exception e)
		{
		}
	}
}

Edited by peter_budo: Keep it Organized - For easy readability, always wrap programming code within posts in [code] (code blocks)

Votes + Comments
Read the rules about giving code before you post such shit.
0

I didn't see the dates at all. Sorry. @sarath_p_j: The OP has long gone.

Edited by verruckt24: n/a

0

Next time, please make a new thread. This thread is very old.

If you are absolutely sure you want an .exe, and there are many reasons not to, try some of the links above or just searching the terms yourself.

0

And for reference you can't make a .exe from source code you implement in java.
Only .jar and then you can use a 3rd party program to package it in .exe.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.