//Addition program that use JOptionPane for input and output.

 import javax.swing.JOptionPane;

 public class Addition{
public static void main(String[] args) {
String firstNumber=JOptionPane.showInputDialog("Enter first integer!"); String secondNumber=JOptionPane.showInputDialog("Enter second integer!"); int num1=Integer.parseInt(firstNumber);
int num2=Integer.parseInt(secondNumber); int sum=num1+num2; JOptionPane.showMessageDialog(null,"The sum is:\t"+sum,"sum of two integers",JOptionPane.PLAIN_MESSAGE); }
}

[20160704]Addition program that use JOptionPane for input and output的更多相关文章

  1. Python - 3. Input and Output

    from:http://interactivepython.org/courselib/static/pythonds/Introduction/InputandOutput.html Input a ...

  2. C lang:character input and output (I/O)

    Xx_Introduction Character input and output is by more line character conpose of the text flow  Defin ...

  3. 7. Input and Output

    7. Input and Output There are several ways to present the output of a program; data can be printed i ...

  4. Python Tutorial 学习(七)--Input and Output

    7. Input and Output Python里面有多种方式展示程序的输出.或是用便于人阅读的方式打印出来,或是存储到文件中以便将来使用.... 本章将对这些方法予以讨论. 两种将其他类型的值转 ...

  5. [Python] Print input and output in table

    Print the input and output in a table using prettyTable. from prettytable import PrettyTable import ...

  6. Input and Output File

    Notes from C++ Primer File State Condition state is used to manage stream state, which indicates if ...

  7. [20171128]rman Input or output Memory Buffers.txt

    [20171128]rman Input or output Memory Buffers.txt --//做一个简单测试rman 的Input or output Memory Buffers. 1 ...

  8. Angular4学习笔记(六)- Input和Output

    概述 Angular中的输入输出是通过注解@Input和@Output来标识,它位于组件控制器的属性上方. 输入输出针对的对象是父子组件. 演示 Input 新建项目connInComponents: ...

  9. Java中的IO流,Input和Output的用法,字节流和字符流的区别

    Java中的IO流:就是内存与设备之间的输入和输出操作就成为IO操作,也就是IO流.内存中的数据持久化到设备上-------->输出(Output).把 硬盘上的数据读取到内存中,这种操作 成为 ...

随机推荐

  1. Enabling and Mounting NFS on CoreOS

    http://blog.scottlowe.org/2015/02/20/config-mount-nfs-coreos/ #cloud-config write-files: - path: /et ...

  2. centos 7.0 查看所有安装的包

    rpm方式安装的包 默认 最小化安装centos 7.0 rpm -qa 查看所有安装的包 [root@localhost ~]# rpm -qa biosdevname-0.5.0-10.el7.x ...

  3. VS2012打包Winform教程 [转]

    VS2012打包部署Winform程序 打包前的准备工作: 里边会提到第一次使用的时候打开网页填数据什么的..最终要下载一个EXE文件..其实大可不必.. 直接百度InstallShield2012S ...

  4. 初识ActionScript

    <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:fx="h ...

  5. 如何配置pl/sql (本地客户端)连接远程oracle服务器

    配置方法: 1.找到oracle的安装目录.如:C:\oracle\product\10.2.0\db_1\network\ADMIN 2.找到tnsnames.ora文件. 3.用文本方式打开,添加 ...

  6. python基础教程1

    python作为一种编程语言,诞生于1990年左右,算是一门比较年轻的语言(也算是90后吧),它是面向对象的,但不同于JAVA\C#那么严格要求一切皆对象,更接近于C++,是面向过程和面向对象的结合: ...

  7. Properties类的使用方法

    它提供了几个主要的方法: 1. getProperty ( String key),用指定的键在此属性列表中搜索属性.也就是通过参数 key ,得到 key 所对应的 value. 2. load ( ...

  8. jQuery回调、递延对象总结(中篇) —— 神奇的then方法

    前言: 什么叫做递延对象,生成一个递延对象只需调用jQuery.Deferred函数,deferred这个单词译为延期,推迟,即延迟的意思,那么在jQuery中 又是如何表达延迟的呢,从递延对象中的t ...

  9. 网站SEO优化之添加Sitemap文件。

    Sitemap.xml 故名思意就是站点地图文件,可以指引Google spider 收录相应网页.正确地使用Google Sitemap,可以确保让Google spider 不遗漏网站内的任何页面 ...

  10. Hadoop 面试题 之Hive

    1.Hive 有哪些方式保存元数据,各有哪些特点. 15. Hive内部表和外部表的区别 23.hive底层与数据库交互原理Hive的Hql语句掌握情况? 36.使用Hive或自定义mr实现如下逻辑: ...