- 博客(17)
- 资源 (11)
- 收藏
- 关注
原创 html
班班网班班网班班网班班网班班网班班网班班网班班网班班网班班网班班网班班网班班网 班班网加大班班网加大 班班网1 班班网2 班班网3 班班网4 班班网班班网班班网班班网
2013-12-27 17:06:38 695
原创 public class Unname2
interface Compute{ public void mult(int x,int y);}class A{ void method1(Compute c,int i,int j) { c.mult(i,j); } void method2() { method1(new Compute() { public void mult (int x, int
2013-12-03 21:05:53 590
原创 E_FileInputStream
import java.io.*;class E_FileInputStream{ public static void main(String args[]) { String s="e:\\java\\E_super.txt"; try { FileInputStream fis=new FileInputStream(s); int ch=fis.read()
2013-12-03 21:04:57 626
原创 public class staticInter
public class staticInter{ public static class Student { int no; String name; int age; static int count=0; Student(int no,String name,int age) { this.no=no; this.name=name;
2013-12-03 21:02:25 737
原创 class E_up
class Monkey{ private int n=100; void speak(String s) { System.out.println(s); }}class People extends Monkey{ void compute(int a,int b) { int c=a+b; System.out.println(a+"+"+b+"="+c);
2013-12-03 21:01:17 655
原创 staticInter
public class staticInter{ public static class Student { int no; String name; int age; static int count=0; Student(int no,String name,int age) { this.no=no; this.name=name;
2013-12-03 21:00:12 801
原创 Unname
interface Compute{ public void mult(int x,int y);}class A{ void method1(Compute c,int i,int j) { c.mult(i,j); } void method2() { method1(new Compute() { public void mult (int x, int
2013-12-03 20:58:34 947
原创 switch分支
public class SwitchDemo{ public void showDays(int iMonth) { int iDays=0; switch(iMonth) { case 2: iDays=28;break; case 4: iDays=30;break; case 6: iDays=30;break; case 9: iDays=30;
2013-12-03 20:55:24 561
原创 子类调用父类构造方法示例
class Monther{ private int dollar; public int HK; public Monther() { dollar =300; HK=200; System.out.println("fuleiwucanshudegouzaohanshubeidiaoyong"); } public Monther(int dollar,int HK)
2013-12-03 20:53:30 1127
原创 ShowAscii
public class ShowAscii{ public static void main(String args[]) { String temp=""; for(int i=32;i<=126;i++) { temp=i<100?("0"+i):(""+i); System.out.print(temp+"="+(char)i+"
2013-12-03 20:50:25 715
原创 SortABC
public class SortABC{ public static void main(String args[]) { int a=8582,b=4,c=307; int t; if(a>b) {t=a;a=b;b=t;} if(a>c) {t=a;a=c;c=t;} if(b>c) {t=b;b=c;c=t;} System.out.p
2013-12-03 20:49:11 741
原创 素数
public class Susu{ public static void main(String args[]) { System.out.println("3--100deshushuyou: "); boolean isprime; int iCount=0; for(int i=3;i<=100;i++) { isprime =true; for(i
2013-12-03 20:48:07 724
原创 在外部类的方法中访问实例内部类示例
////在外部类的方法中访问实例内部类示例public class InterClass { class Information { private int year; private String inf; Information(int year,String inf) { this.year=year; this.inf=inf; } publi
2013-12-03 20:45:10 1511
原创 在内部类中访问外部类
class Basin{ String land="盆地";}class Sichuan{private static int a=20;int b=50;Chengdu chengdu;Sichuan(){ chengdu=new Chengdu();}void display(){System.out.println("woshisichuan");chengd
2013-12-03 20:43:15 652
原创 嵌套语句
//import java.util.Scanner;public class IfDemo{ public static void main(String args[]) { int iScore=78; String sGrade; if(iScore>=90) sGrade="you"; else if(iScore>=80)
2013-12-03 19:49:31 734
原创 顺序结构
import java.util.Scanner;class E_sequence{ public static void main(String[]args) { double width,height,area,girth; Scanner keyIn=new Scanner(System.in); System.out.println("dddddddddddddd
2013-12-03 19:45:24 687
原创 打印几个特定字符的ASCII码
public class PrintAscii{ public void dispAscii(char ch) { int iTmp=(int)ch; System.out.println(ch+"的Ascii码是"+iTmp); } public static void main(String args[]) { PrintAscii o
2013-12-03 19:42:05 1937
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人