![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
文章平均质量分 52
浴火涅磐
这个作者很懒,什么都没留下…
展开
-
50个人围一圈每次数到3或三的倍数就出去球剩余的人
public class hhhh{ public static int removeNM(int n, int m) { LinkedList list = new LinkedList(); for (int i = 0; i list.add(new Integer(i + 1)); int removed = -1;原创 2009-04-09 19:29:00 · 1362 阅读 · 0 评论 -
学习网站
1.Java学习网站: Java中文世界论坛 http://www.chinajavaworld.com/index.jspa Java世纪网 http://www.java2000.net/ Java 中文站 http://www.java-cn.com/ Java学习室 http://www.ja转载 2009-10-20 20:15:00 · 605 阅读 · 1 评论 -
一个关于异常的例子
class J_ExceptionNew extends Exception{ /** * */ private static final long serialVersionUID = 1L; private static int m_number=0; public J_ExceptionNew(){ m_number++; } public原创 2009-07-13 08:29:00 · 423 阅读 · 0 评论 -
一个简单的Swing程序
public static void main(String[] args) { JOptionPane.showMessageDialog(null, "您好"); JOptionPane.showConfirmDialog(null, "您现在还好吗?"); JOptionPane.showInputDialog(null, "您现在还好吗?"); String [] s={"原创 2009-06-22 09:31:00 · 444 阅读 · 0 评论 -
鼠标坐标问题
import java.awt.*;import java.awt.event.*;import javax.swing.*;public class Shubiao extends JFrame { public Shubiao(){ JPanel p = new JPanel(); p.addMouseMotionListener(原创 2009-06-14 20:21:00 · 398 阅读 · 0 评论 -
字符转换
PrintStream f; try { f = new PrintStream("out.txt"); f.printf("%1$d+%2$d=%3$d", 1,2,(1+2)); f.close(); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.print原创 2009-06-10 12:56:00 · 267 阅读 · 0 评论 -
一个文件流的程序
public class J_BufferReaderWriter { public static void main(String[] args) { try { BufferedWriter bw = new BufferedWriter( new FileWriter("d:/test.txt")); bw.write("有志者,事竟成,百日秦关终属楚"原创 2009-06-08 11:48:00 · 375 阅读 · 0 评论 -
一个关于Integer的问题
首先看一下这段代码 Integer i1 = 100; Integer i2 = 100; if (i1==i2) { System.out.println("i1==i2"); } else { System.out.println("i1!原创 2009-05-25 08:51:00 · 571 阅读 · 1 评论 -
IO输入输出流
我写的一个小程序: public static void main(String[] args) { try { FileInputStream f=new FileInputStream("/test.txt"); int i; int b=f.read(); for(i=0;b!=-1;i++){ System.out.print((char)b原创 2009-05-27 09:54:00 · 335 阅读 · 0 评论 -
递归求解汉诺塔问题
java code: public class J_Hanoi { public static void digui(int n,char start,char temp,char end){ if(n System.out.println("将盘从"+start+"移到"+end+"-----------"); else{原创 2009-05-09 23:22:00 · 475 阅读 · 0 评论 -
一个简单的复数运算
package JDK;public class ComplexNumber { private double realPart;// 复数的实部 private double imageinaryPart;// 复数的虚部 /** */ public ComplexNumber() { super(); this.realPart = 0.0; this.imageinaryPa原创 2009-04-29 19:41:00 · 904 阅读 · 0 评论 -
测试Oracle是否开启,和怎样开启
首先测试的是:在命令行中输入telnet localhost 1521 如果测试端口没有开启则在命令行活着开始输入:services.msc然后找到Oracle的agent服务,启动它就可以了。原创 2009-04-26 19:36:00 · 678 阅读 · 0 评论 -
日期转换
import java.sql.Timestamp;import java.text.SimpleDateFormat;import java.util.Calendar;public class StringToDate { public static void main(String[] args){ String s=new String(原创 2009-10-27 19:47:00 · 501 阅读 · 0 评论