[20160704]Addition program that use JOptionPane for input and output
//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的更多相关文章
- Python - 3. Input and Output
from:http://interactivepython.org/courselib/static/pythonds/Introduction/InputandOutput.html Input a ...
- 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 ...
- 7. Input and Output
7. Input and Output There are several ways to present the output of a program; data can be printed i ...
- Python Tutorial 学习(七)--Input and Output
7. Input and Output Python里面有多种方式展示程序的输出.或是用便于人阅读的方式打印出来,或是存储到文件中以便将来使用.... 本章将对这些方法予以讨论. 两种将其他类型的值转 ...
- [Python] Print input and output in table
Print the input and output in a table using prettyTable. from prettytable import PrettyTable import ...
- Input and Output File
Notes from C++ Primer File State Condition state is used to manage stream state, which indicates if ...
- [20171128]rman Input or output Memory Buffers.txt
[20171128]rman Input or output Memory Buffers.txt --//做一个简单测试rman 的Input or output Memory Buffers. 1 ...
- Angular4学习笔记(六)- Input和Output
概述 Angular中的输入输出是通过注解@Input和@Output来标识,它位于组件控制器的属性上方. 输入输出针对的对象是父子组件. 演示 Input 新建项目connInComponents: ...
- Java中的IO流,Input和Output的用法,字节流和字符流的区别
Java中的IO流:就是内存与设备之间的输入和输出操作就成为IO操作,也就是IO流.内存中的数据持久化到设备上-------->输出(Output).把 硬盘上的数据读取到内存中,这种操作 成为 ...
随机推荐
- CentOS 7学习手册
CentOS 7与之前版本有较大变动,查阅资料,整理得到如下手册(未完~). 一.安装 1.使用哪种方式安装 (1).虚拟机安装,推荐:VM,功能齐全,强大(Virtual Box也可以). (2). ...
- Lua弱引用table
弱引用table 与python等脚本语言类似地,Lua也采用了自动内存管理(Garbage Collection),一个程序只需创建对象,而无需删除对象.通过使用垃圾收集机制,Lua会自动删除过期对 ...
- redis入侵小结
redis安装: windows安装包:http://pan.baidu.com/s/1i3jLlC5 下载下来之后,开始安装: redis-server.exe redis.conf: 简单一步,安 ...
- Servlet的配置
让 Servlet 能响应用户请求,必须将 Servlet 配置在 Web 应用中. Servlet 3.0 中有两中配置方式: 1. 在 Servlet 类中使用 @WebServle ...
- TFS2012 安装 配置笔记
TFS2012安装 具体请看文档.. http://yunpan.cn/cmt4X6S7TjEgq 访问密码 464e TFS2012配置 环境:VS2012 SQL2008 T ...
- 【采集层】Kafka 与 Flume 如何选择--转自悟性的博文
[采集层]Kafka 与 Flume 如何选择 收藏 悟性 发表于 2年前 阅读 23167 收藏 16 点赞 4 评论 1 摘要: Kafka, Flume 采集层 主要可以使用Flume, Kaf ...
- Genymotion启动时出现错误virtualization engine not found
打开VirtualBox,管理-全局设定,网络,仅主机“Host-only”网络,需要的设置如下
- Sublime Text3
Sublime Text3 激活码: ----- BEGIN LICENSE ----- Andrew Weber Single User License EA7E- 813A03DD 5E4AD9E ...
- Linq to sql 的语法
Linq to SQL 语法查询(子查询 & in操作 & join ) 引用地址:http://www.cnblogs.com/82767136/articles/2949541.h ...
- jquery 获取datagrid行数
var data = $('#dg').datagrid('getData'); alert('总数据量:' + data.total)//注意你的数据源一定要定义了total,要不会为undefin ...