JAVACODE(tt)
skytalemcc
古之成大事者,不惟超世之才,亦必有坚韧不拔之志!
展开
-
OutNum.java
public class OutNum { public void outputs(int n) { for (int i = 1; i int num = 0; int index = i; for (int j = i; j num = num + j; if (num == n) { System.out.println(index + ".原创 2009-12-28 21:52:00 · 193 阅读 · 0 评论 -
calculator.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import java.awt.Rectangle;import java.awt.GridBagLayout;imp原创 2009-12-28 21:17:00 · 277 阅读 · 0 评论 -
Personu.java
public class Personu { int age; public int getAge() { return age; }// 输出值要返回int 所以要定义int public void setAge(int age) { this.age = age; }//输入值是定义age的 所以没有返回值 ()里面定义age的类型就行了 不用定义返回值 }原创 2009-12-28 21:16:00 · 169 阅读 · 0 评论 -
framework.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import javax.swing.JButton;import java.awt.Rectangle;import原创 2009-12-28 21:09:00 · 171 阅读 · 0 评论 -
OutFile.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import javax.swing.JTextField;import java.awt.Rectangle;imp原创 2009-12-28 21:07:00 · 185 阅读 · 0 评论 -
aa.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import javax.swing.JButton;import java.awt.Rectangle;import原创 2009-12-28 21:07:00 · 176 阅读 · 0 评论 -
client.java
import java.net.*;import java.io.*;import java.util.*;import java.awt.event.*;import java.awt.*;import javax.swing.*;import java.applet.*;public class client extends JFrame implements ActionListener原创 2009-12-28 21:06:00 · 210 阅读 · 0 评论 -
filereader.java
import java.io.*;public class filereader {//读文件 读取一个文件显示出来 public static void main(String args[]) { String name="te.txt";//c://te.txt File ss=new File(name); try { FileReader a=new FileReader原创 2009-12-28 21:04:00 · 180 阅读 · 0 评论 -
shurushuchu.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import javax.swing.JButton;import java.awt.Rectangle;import原创 2009-12-28 21:03:00 · 170 阅读 · 0 评论 -
Person1.java
public class Person1 { int age; public int getAge() { return age; }// 输出值要返回int 所以要定义int public void setAge(int age) { this.age = age; }//输入值是定义age的 所以没有返回值 ()里面定义age的类型就行了 不用定义返回值 }原创 2009-12-28 21:01:00 · 177 阅读 · 0 评论 -
Frame.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.FlowLayout;import java.awt.CardLayout;import java.awt.Dimension;im原创 2009-12-28 20:58:00 · 259 阅读 · 0 评论 -
Hello.java
/*gghhhlmhbhvcgfdhfjkhljfhgjhkkghjkll;fghkljl;k *hjkljgjklmngbvf *jmnhgfjnkljhgfhjkl *lkjhghjk *lkjhg */ public class Hello{ public static void main (String[] args){ String name="Chatmare"; System原创 2009-12-28 20:57:00 · 165 阅读 · 0 评论 -
DBI.java
import java.sql.CallableStatement;import java.sql.Connection;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import java.sql.SQLException;import java.sql.原创 2009-12-28 20:55:00 · 200 阅读 · 0 评论 -
rand.java
//import java.math.*;import java.lang.Math;public class rand { private int[] i=new int[7]; public void randint(int a) { this.i[a]=(int)(30*Math.random()+1); } public static void main(String[] args) {原创 2009-12-28 20:54:00 · 206 阅读 · 0 评论 -
runner.java
public interface runner{ public void start(); public void stop(); }原创 2009-12-28 20:49:00 · 163 阅读 · 0 评论 -
exm.java
abstract class abstractest { abstract void a1(); public void a2(){ System.out.println("hello world"); }}class absed extends abstractest{ void a1() {System.out.println("hello"); }}publi原创 2009-12-28 20:49:00 · 153 阅读 · 0 评论 -
statictest.java
public class statictest { public static void main(String args[]){ person4 a=new person4(); System.out.println("totol="+a.totol);//totol只有一个 因为static totol=1 person4 b=new person4();System.out原创 2009-12-28 20:48:00 · 172 阅读 · 0 评论 -
Command.java
package sic;import java.util.HashMap;public interface Command{ public void execute(HashMap has); }原创 2009-12-28 21:31:00 · 174 阅读 · 0 评论 -
InvertIpAddressCod.java
public class InvertIpAddressCod implements IpAddressInvert { public void invertIpAddress(String ip) { int a=ip.indexOf("."); int b=ip.indexOf(".",a+1); int c=ip.lastIndexOf("."); //原创 2009-12-28 21:52:00 · 157 阅读 · 0 评论 -
ChatServer.java
import java.io.*;import java.net.*;public class ChatServer { public static void main(String[] args) { boolean started =false; ServerSocket ss =null; Socket s=null; try { ss = new ServerS原创 2009-12-28 21:33:00 · 165 阅读 · 0 评论 -
InsertCmd.java
package sic;import java.sql.ResultSet;import java.util.HashMap;public class InsertCmd implements Command { public void execute(HashMap has) { ResultSet res = DBConnected.getMsg((String原创 2009-12-28 21:32:00 · 151 阅读 · 0 评论 -
dataModel.java
package sic;import java.sql.Date;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import java.sql.SQLException;import java.sql.Timestamp;import javax.swing.event.TableModelListener;import原创 2009-12-28 21:31:00 · 215 阅读 · 0 评论 -
aaa.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;public class aaa extends JFrame { private static final long serialVersionUID = 1L原创 2009-12-28 21:30:00 · 156 阅读 · 0 评论 -
search.java
import javax.sql.RowSetMetaData;import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import java.awt.Rectangle;i原创 2009-12-28 21:29:00 · 218 阅读 · 0 评论 -
testmsg.java
import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import javax.swing.JTextField;import java.awt.Rectangle;import java.io.BufferedReader;import原创 2009-12-28 21:11:00 · 250 阅读 · 0 评论 -
shengming.java
import java.util.*;public class shengming { public static void main(String[] args) { ArrayList a=new ArrayList(); a.add("济南"); a.add("日照"); a.add("邹平"); System.out.println(a); int x=a.ind原创 2009-12-28 21:10:00 · 379 阅读 · 0 评论 -
bijiao.java
public class bijiao { public static void main(String args[]) { int x = 10; int y = 10; person a = new person(10); person b = new person(10); if (x == y) { System.out.println("dengyu"); } e原创 2009-12-28 21:02:00 · 185 阅读 · 0 评论 -
person5.java
public class person5 { private int id; public int totol=0; public person5() { totol++; id=totol; } static{ //totol=100;用于static变量的初始化 }}原创 2009-12-28 20:48:00 · 275 阅读 · 0 评论 -
student3.java
import sun.util.calendar.BaseCalendar.Date; public class student3 extends person3{8:46 PM 12/28/2009 public String school; public student3(String name,int age,Date dated,String school) { super(n原创 2009-12-28 20:47:00 · 152 阅读 · 0 评论 -
randm.java
import java.io.IOException;import java.lang.Math;import java.lang.System; class random{ public static void main(String[] args) throws IOException{ int i; int n=(System.in.read()); int a; f原创 2009-12-28 20:44:00 · 140 阅读 · 0 评论 -
paixu3.java
import java.util.Scanner;public class paixu3 { public static void main(String[] args) { for (int x = 1;; x++) { int a[] = new int[6]; for (int m = 0; m System.out.println("请输入六个数,按回车");原创 2009-12-28 20:42:00 · 168 阅读 · 0 评论 -
array.java
public class array{public static void main(String[] args){int a[]={1,2,3,4,5,6};int j;for(j=0;j{System.out.println("a["+j+"]="+a[j]);} } }//输出数组原创 2009-12-28 20:39:00 · 140 阅读 · 0 评论 -
all.java
public class all { public static void main(String[] args) { int a; for (a = 1; a int b = a / 25; int c = 0; float d; switch (b) { case 0: c = a * 10; d = (float) (c / 10.0原创 2009-12-28 20:34:00 · 142 阅读 · 0 评论 -
ShowDate.java
import java.util.Calendar;import java.util.Date;public class ShowDate { public static void main(String args[]) { Date d = new Date(); System.out.println("time is " + (d.getYear() + 1900) +原创 2009-12-28 20:25:00 · 235 阅读 · 0 评论 -
HelloWorld.java
public class HelloWorld{public static void main(String[] args){System.out.println("Hello World");}}原创 2009-12-28 20:15:00 · 152 阅读 · 0 评论 -
person4.java
public class person4 { private int id; public static int totol=0; public person4() { totol++; id=totol; } static{ //totol=100;用于static变量的初始化 }}原创 2009-12-28 20:47:00 · 162 阅读 · 0 评论 -
person3.java
import sun.util.calendar.BaseCalendar.Date;public class person3 { private String name; private int age; private Date dated; public person3(String name, int age, Date dated) { this.name = name原创 2009-12-28 20:46:00 · 167 阅读 · 0 评论 -
delete.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JPanel;import javax.swing.JFrame;import java.awt.Dimension;import javax.swing.JLabel;import java.awt.Rectangle;import原创 2009-12-28 21:22:00 · 182 阅读 · 0 评论 -
MyJdbc.java
import javax.swing.SwingUtilities;import java.awt.BorderLayout;import javax.swing.JComponent;import javax.swing.JOptionPane;import javax.swing.JPanel;import javax.swing.JFrame;import javax.swing.JLa原创 2009-12-28 21:21:00 · 171 阅读 · 0 评论 -
testdb.java
import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.SQLException;import javax.swing.JOptionPane;public class testdb原创 2009-12-28 21:20:00 · 184 阅读 · 0 评论