上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页

如何安全的读入一个整数或者浮点数

摘要: import java.util.*;import java.util.regex.Pattern;/** * 类名:GetSafeNumber * 作用:在控制台中安全的读入一个数值 ------ 整型或浮点型 * * 方法: * 1,用 try ... catch ... * 2,用正则表达式 * * 方法1--说明: * 阻塞的方式,用Scanner从控制台安全的读入一个数 * * 创建时间:2012-8-8 * * @author 常维军 * */class GetSafeNumber{ /** * 阻塞式的从控制台读入一个安全的整数 * @param sc 从控制台读入的... 阅读全文
posted @ 2012-08-06 14:56 Yours风之恋 阅读(200) 评论(0) 推荐(0) 编辑

.net(数组)

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication8{ class Program { static void Main(string[] args) { // 数组定义的三个方式 int[] array1 = { 1, 2, 3, 4, 5 }; int[] array2 = new int[5]; ... 阅读全文
posted @ 2012-07-10 19:13 Yours风之恋 阅读(211) 评论(0) 推荐(0) 编辑

.net(基本数据类型,枚举类型,枚举字符串的相互转化)

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication3{ /// /// /// class Program { /// /// /// /// static void Main(string[] args) { Cat cat = new Cat(); ... 阅读全文
posted @ 2012-07-10 09:06 Yours风之恋 阅读(452) 评论(0) 推荐(0) 编辑

.net(三个简单的作业)

摘要: 1,读入一个小数,将小数部分和整数部分交换:例如 3.14 ---〉14.3using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace TestExchange{ class Program { static void Main(string[] args) { while (true) { // 1,从控制台读入一个小数,存放在 testDouble 中 ... 阅读全文
posted @ 2012-07-10 08:55 Yours风之恋 阅读(210) 评论(0) 推荐(0) 编辑

.net(关于字符串的相等问题[比较重要])

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace TestString{ class Program { static void Main(string[] args) { string a = "hello"; string b = "h"; b +="ello"; string c = "hello"; if ... 阅读全文
posted @ 2012-07-10 08:45 Yours风之恋 阅读(196) 评论(0) 推荐(0) 编辑

.net(从控制台读入两个数,实现加减乘除)

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace TestClaclulate{ class Program { static void Main(string[] args) { // 1,定义double变量 double numberOne; double numberTwo; // 2,从控制台获得两个数 ... 阅读全文
posted @ 2012-07-10 08:42 Yours风之恋 阅读(260) 评论(0) 推荐(0) 编辑

.net(枚举和switch结构)

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace ConsoleApplication5{ class Program { static void Main(string[] args) { Gender sex = Gender.F; switch (sex) { case Gender.M: ... 阅读全文
posted @ 2012-07-10 08:36 Yours风之恋 阅读(214) 评论(0) 推荐(0) 编辑

.net 概述

摘要: 1,版本说明2,版本和依赖关系3,.net Framework 体系架构 阅读全文
posted @ 2012-07-09 21:46 Yours风之恋 阅读(145) 评论(0) 推荐(0) 编辑

报告一个现象(关于Windows桌面图标莫名改变)

摘要: 前几天给电脑扩了2G内存,然后索性装了64位的操作系统。然后笔记本电脑你懂的。。。。一股脑的猛地装驱动,重启,装软件,重启。。。。。。然后就是重点了,Eclipse图标突然变了,怎么都恢复不了。起初觉得是64位系统的原因。也没有在意就这么用着,没有管它了。今天突然想试一下谷歌的拼音输入法,于是就把搜狗给写卸了,结果奇迹发生了Eclipse图标变正常了。初步得出结论是搜狗输入法修改了系统的什么东西,导致某些软件不兼容。其实,改变图标也不只是Eclipse,还有360的软件管家和魔方的一键清理等等图标。 阅读全文
posted @ 2012-05-23 23:56 Yours风之恋 阅读(117) 评论(0) 推荐(0) 编辑

Windows 7 自动进入桌面

摘要: 在设密码的情况下,每次都要输入密码是很麻烦的一件事。你可以用如下步骤实现自动登录:1,windows + R , 输入:CMD 进入命令行2,输入:control userpasswords2 ,勾掉“要使用本机,用户必须输入用户名和密码”3,确定。 阅读全文
posted @ 2012-05-20 11:58 Yours风之恋 阅读(127) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 ··· 18 下一页