摘要: public static void main(String[] args) {System.out.print("红色的号码为:");Set set=new HashSet();while (true) {int i=(int)(Math.random()*33+1);set.add(i);if ... 阅读全文
posted @ 2014-06-16 21:36 心若向阳,何惧忧伤 阅读(3365) 评论(0) 推荐(0) 编辑
摘要: public static void main(String[] args) {Scanner scanner=new Scanner(System.in);//根据日历类对象的方法,实例化一个当前的日历类对象Calendar calendar=Calendar.getInstance();Syst... 阅读全文
posted @ 2014-06-16 21:32 心若向阳,何惧忧伤 阅读(2848) 评论(0) 推荐(0) 编辑
摘要: import javax.swing.JOptionPane;自然数中还有一类数被称为回文数。回文数就是一个数的两边对称,如11,121,1221,9339,30203等等public class CircleTest{public static void main(String[] args){S... 阅读全文
posted @ 2014-06-16 21:29 心若向阳,何惧忧伤 阅读(1002) 评论(0) 推荐(1) 编辑
摘要: ◆Form.StartPosition属性,确定窗体第一次出现时的位置。这里设置为在父窗体的中间显示。 this.StartPosition = FormStartPosition.CenterParent; ◆Form.HelpButton属性,确定窗体的标题栏上是否有“帮助”按钮。设置显... 阅读全文
posted @ 2014-06-16 21:19 心若向阳,何惧忧伤 阅读(1026) 评论(0) 推荐(0) 编辑
摘要: 计算两个Date之间的时间差,基本思路为把Date转换为ms(微秒),然后计算两个微秒时间差。时间的兑换规则如下:1s秒 = 1000ms毫秒1min分种 = 60s秒1hours小时 = 60min分钟1day天 = 24hours小时 package com.qiyadeng.date;impo... 阅读全文
posted @ 2014-06-16 21:03 心若向阳,何惧忧伤 阅读(973) 评论(0) 推荐(0) 编辑
摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Windows.Forms;using System.IO;namespace Demo{/// /// 有关... 阅读全文
posted @ 2014-06-16 20:42 心若向阳,何惧忧伤 阅读(1140) 评论(0) 推荐(0) 编辑