文章分类 -  J#

上一页 1 2
J#-标准输入
摘要:try { /* InputStream is = System.in;//控制台输入字节流 InputStreamReader isr = new InputStreamReader(is);//将字节流,转换为字符流 BufferedReader br = new Buffer... 阅读全文
posted @ 2014-07-06 22:39 ylbtech 阅读(149) 评论(0) 推荐(0)
J#-保存一个文件
摘要:JFileChooser fc = new JFileChooser("F:");int resultSave = fc.showSaveDialog(this);if(resultSave == 0){ try { File f = fc.getSelectedFile(); Fi... 阅读全文
posted @ 2014-07-06 22:36 ylbtech 阅读(95) 评论(0) 推荐(0)
J#-Sun简介
摘要:sun公司美国SUN(Stanford University Network)公司,在中国大陆的正式中文名为“太阳计算机系统(中国)有限公司”,在台湾的正式中文名为“升阳电脑公司”。1982年,Sun Microsystems公司诞生于美国斯坦福大学校园。Sun公司1986年上市,在NASDAQ的标... 阅读全文
posted @ 2014-07-06 22:31 ylbtech 阅读(496) 评论(0) 推荐(0)
J#-Sql函数
摘要:sql函数 1)数学函数 sqrt() //平方根 floor() //向下取整 ceiling() //向上取整 rand() //随机一个0--1之间的数 2)时间函数 getdate() //获取当前时间 year(date) //取date日期... 阅读全文
posted @ 2014-07-06 22:27 ylbtech 阅读(110) 评论(0) 推荐(0)
J#-prepareStatement
摘要://PreparedStatement ps = conn.prepareStatement("select * from books where book_id > ?");//操作类 //ps.setInt(1,bookId);//给问号赋值Class.forName("con.micros... 阅读全文
posted @ 2014-07-06 22:25 ylbtech 阅读(106) 评论(0) 推荐(0)
J#-point
摘要:Point point = lblBack.getLocation();//背景的位置 int x = point.x; int y = point.y; if(e.getKeyCode() == KeyEvent.VK_UP) { y+=5; }JLabel lblBack = ne... 阅读全文
posted @ 2014-07-06 22:24 ylbtech 阅读(93) 评论(0) 推荐(0)
J#-Math类
摘要:5.Math类Math类是一个最终类,它包含了常用的科学计算方法,如开方、指数运算、对数、三角函数等。这些方法都是静态方法,可以通过类名直接调用。public static final double E:自然数e。public static final double PI:π。public stat... 阅读全文
posted @ 2014-07-06 22:23 ylbtech 阅读(161) 评论(0) 推荐(0)
J#-C# 对比
摘要:C#和Java的不同1、导包import java.lang.*---->using System2、主函数main------>Main3、输入和输出System.out.println--->Console.WriteLineSystem.out.print---->Console.Write(... 阅读全文
posted @ 2014-07-06 22:22 ylbtech 阅读(294) 评论(0) 推荐(0)
J#-ArrayList
摘要:动态数组1 导入包:import java.util.*;2 定义动态数组对象ArrayList 数组名=new ArrayList();ArrayList 数组名=new ArrayList();3 动态数组对象常用方法size() //返回数组长度add(object o) ... 阅读全文
posted @ 2014-07-06 22:20 ylbtech 阅读(112) 评论(0) 推荐(0)

上一页 1 2