My first java application

Please post all your completed software applications in here. This is for full software which you have created and wish to release and share with everyone.
5 posts Page 1 of 1
Contributors
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

My first java application
AnoPem
This is my very first java program
I made this program that can tell how many euro danish crowns is

1 Euro = 7,45 Danish Crowns

Put amount to exchange
Image

Amount was 7,45 Danish crowns
Image

Code: Select all
import javax.swing.JOptionPane;

public class Valuta {

	
	public static void main(String[] args) {
		
		double vul, val, sum;
		String str1 = JOptionPane.showInputDialog("Indtast et tal du vil omregne til euro");
	 	str1 = str1.replaceAll(",", ".");
       	       
	 	vul = 7.45;
	 	 val = Double.valueOf(str1.trim()).doubleValue();
			
				sum = val / vul;

System.out.println(val + "Dkk omregnet til Euro = " +  sum + "Euro");
		JOptionPane.showMessageDialog(null, str1 + " Dkk er = " + sum + " euro", "Dkk til Euro ", JOptionPane.INFORMATION_MESSAGE);
	}

}
https://t.me/pump_upp
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: My first java application
Dummy1912
cool
but do you have to always add the converted value in the code itself?
seems it gonna be a LONG project then :lol:
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
AnoPem
VIP - Donator
VIP - Donator
Posts: 441
Joined: Sat Jul 24, 2010 10:55 pm

Re: My first java application
AnoPem
Dummy1912 wrote:
cool
but do you have to always add the converted value in the code itself?
seems it gonna be a LONG project then :lol:
No i dont add the converted value

sum = val / vul
vul is always 7,45 and val is your input
50 / 7,45 = 6,71 Euro
7,45 / 7,45 = 1 Euro
Last edited by AnoPem on Sun Sep 02, 2012 8:36 am, edited 1 time in total.
https://t.me/pump_upp
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: My first java application
Dummy1912
haha sorry my mistake then :D
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Shim
VIP - Donator
VIP - Donator
Posts: 882
Joined: Wed Dec 14, 2011 5:02 am

Re: My first java application
Shim
wow ! Very well done anopem
Find my programs on Softpedia
5 posts Page 1 of 1
Return to “Full Software”