摘要: #include <stdio.h>#include <malloc.h>#include <stdlib.h>#include <string.h> #define M 10#define N 15 typedef struct book_info{ char ISBN[N];//书号 char 阅读全文
posted @ 2017-03-18 22:46 大仁哥汪宝 阅读(289) 评论(0) 推荐(0) 编辑
摘要: class staticDemo{ static int m=10; static int n; static void method(int a){ System.out.println("a="+a); System.out.println("m="+m); System.out.println 阅读全文
posted @ 2017-03-18 13:00 大仁哥汪宝 阅读(172) 评论(0) 推荐(0) 编辑
摘要: public class MatixDemo { public static void main(String[] args) { // TODO 自动生成的方法存根 int[][]a1={{1,2,3},{4,5,6}}; int[][]b1={{1,2},{3,4},{5,6}}; int[][ 阅读全文
posted @ 2017-03-16 23:13 大仁哥汪宝 阅读(133) 评论(0) 推荐(0) 编辑
摘要: public class Magics { public static void main(String[] args) { // TODO 自动生成的方法存根 int i=0; int j=0; int m=0; int n=5; j=(n+1)/2-1; int [][]a=new int[n] 阅读全文
posted @ 2017-03-16 22:52 大仁哥汪宝 阅读(173) 评论(0) 推荐(0) 编辑
摘要: public class GetPrime { public static void main(String[] args) { // TODO 自动生成的方法存根 int a,b = 0,c = 0; a=Integer.parseInt(args[0]); a=Integer.parseInt( 阅读全文
posted @ 2017-03-16 21:49 大仁哥汪宝 阅读(1880) 评论(0) 推荐(0) 编辑
摘要: public class ConWithThis { int count=0; String str="hello"; ConWithThis(int i){ this("java"); count=i; System.out.println("Constructor with int arg on 阅读全文
posted @ 2017-03-16 21:37 大仁哥汪宝 阅读(133) 评论(0) 推荐(0) 编辑
摘要: class A{ String name; public A(String str){ name=str; } public void f1(){ System.out.println("f1() of name"+name+"is invoked!"); } public void f2(){ A 阅读全文
posted @ 2017-03-16 18:08 大仁哥汪宝 阅读(114) 评论(0) 推荐(0) 编辑
摘要: class Student{ private String name="lucy"; private int age=18; Student(){ System.out.println("invoke no parameter construcor method"); System.out.prin 阅读全文
posted @ 2017-03-16 17:56 大仁哥汪宝 阅读(158) 评论(0) 推荐(0) 编辑
摘要: class Pupil{ Pupil(int age){ System.out.println("pupil:"+age); }}class Teacher{ Pupil p1=new Pupil(9); Teacher(){ System.out.println("Teacher()"); p3= 阅读全文
posted @ 2017-03-16 17:39 大仁哥汪宝 阅读(194) 评论(0) 推荐(0) 编辑
摘要: public class Constructor { boolean t; byte b; short s; int i; long l; float f; double d; char c; Constructor(){ t=true; b=12; s=99; i=49; l=120; f=3.1 阅读全文
posted @ 2017-03-16 17:29 大仁哥汪宝 阅读(160) 评论(0) 推荐(0) 编辑