03 2017 档案

摘要:public class Joseph { /** author: acme* date: 2017-1-26* blogs: http://blog.csdn.net/qq_18297675*/ public static void main(String[] args) { Joseph j = 阅读全文
posted @ 2017-03-19 22:57 大仁哥汪宝 阅读(151) 评论(0) 推荐(0) 编辑
摘要:#include <stdio.h> #include <string.h> #include <stdlib.h> #include <conio.h> #define books "f:\\books.txt" #define booksbak "f:\\booksbak.txt" struct 阅读全文
posted @ 2017-03-18 22:51 大仁哥汪宝 阅读(176) 评论(0) 推荐(0) 编辑
摘要:#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) 编辑
摘要:class SortDemo{ int max,midst,mix; SortDemo(){ max=-1; midst=-1; mix=-1; } void sort(int i,int j){ int s; max=j; mix=j; if(max<mix){ s=max; max=mix; m 阅读全文
posted @ 2017-03-16 17:14 大仁哥汪宝 阅读(146) 评论(0) 推荐(0) 编辑
摘要:public class PrimeNumber { boolean isPrime(int n){ for(int i=2;i<=n/2;i++) if(n%i==0) return false; return true; } void printPrime(int m){ int j=0; fo 阅读全文
posted @ 2017-03-16 16:52 大仁哥汪宝 阅读(421) 评论(0) 推荐(0) 编辑
摘要:public class InitiaValue { boolean t; byte b; short s; int i; long l; float f; double d; char c; Point point; void initiaValues(){ System.out.println( 阅读全文
posted @ 2017-03-16 16:32 大仁哥汪宝 阅读(156) 评论(0) 推荐(0) 编辑
摘要:public class Point { private double x; private double y; public Point(double x,double y){ this.x=x; this.y=y; } public double radius(){ return Math.sq 阅读全文
posted @ 2017-03-16 16:17 大仁哥汪宝 阅读(224) 评论(0) 推荐(0) 编辑
摘要:import java.util.*;import java.text.*;public class CalculateWeekDay { public static void main(String[] args) { Date date=new Date(); SimpleDateFormat 阅读全文
posted @ 2017-03-15 23:02 大仁哥汪宝 阅读(275) 评论(0) 推荐(0) 编辑
摘要:public class Matlnvese { public static void main(String[] args) { // TODO 自动生成的方法存根 int a[][]={{1,2,3,4},{5,6,7,8},{9,10,11,12}}; int b[][]=new int[4] 阅读全文
posted @ 2017-03-15 12:52 大仁哥汪宝 阅读(166) 评论(0) 推荐(0) 编辑
摘要:public class MatMax { public static void main(String[] args) { // TODO 自动生成的方法存根 int arr[][]={{12,76,4,1},{19,28,55,6}, {2,10,13,2},{3,9,110,22}}; int 阅读全文
posted @ 2017-03-14 22:58 大仁哥汪宝 阅读(172) 评论(0) 推荐(0) 编辑
摘要:public class NumSort { public static void main(String[] args) { // TODO 自动生成的方法存根 int[]a=new int[args.length]; for(int i=0;i<args.length;i++){ a[i]=In 阅读全文
posted @ 2017-03-13 23:12 大仁哥汪宝 阅读(184) 评论(0) 推荐(0) 编辑
摘要:public class Average { public static void main(String[] args) { // TODO 自动生成的方法存根 int i=args.length; int[]arr=new int [10]; int num =0; int k =0; int 阅读全文
posted @ 2017-03-13 22:49 大仁哥汪宝 阅读(197) 评论(0) 推荐(0) 编辑
摘要:public class Continue { public static void main(String[] args) { // TODO 自动生成的方法存根 int n=0; int i=0; for(n=100;n<=200;n++){ if(n%3!=0) continue; i++; 阅读全文
posted @ 2017-03-13 22:38 大仁哥汪宝 阅读(200) 评论(0) 推荐(0) 编辑
摘要:public class TestNum { public static void main(String[] args) { // TODO 自动生成的方法存根 int i=0; int j=0; int k=0; int n=0; int p=0; for(int m=100;m<100;m++ 阅读全文
posted @ 2017-03-13 22:32 大仁哥汪宝 阅读(205) 评论(0) 推荐(0) 编辑
摘要:public class Calculate { public static void main(String[] args) { // TODO 自动生成的方法存根 long s=1; int k=Integer.parseInt(args[0]); for(int i=1;i<k;i++){ s 阅读全文
posted @ 2017-03-12 23:11 大仁哥汪宝 阅读(194) 评论(0) 推荐(0) 编辑
摘要:public class TestSwitch { public static void main(String[] args) { // TODO 自动生成的方法存根 String x=args[0]; switch(x){ case"春天": System.out.println("春天般的温暖 阅读全文
posted @ 2017-03-12 17:05 大仁哥汪宝 阅读(202) 评论(0) 推荐(0) 编辑
摘要:public class LeapYear { public static void main(String[] args) { // TODO 自动生成的方法存根 int year=Integer.parseInt(args[0]); int leap; if(year%4==0){ if(yea 阅读全文
posted @ 2017-03-12 16:53 大仁哥汪宝 阅读(226) 评论(0) 推荐(0) 编辑
摘要:public class LogicTest { public static void main(String[] args) { boolean a,b,c; a=true;b=false; c=a&b; System.out.println(c); c=a|b; System.out.print 阅读全文
posted @ 2017-03-12 16:33 大仁哥汪宝 阅读(201) 评论(0) 推荐(0) 编辑
摘要:public class Test { /** * @param args */ public static void main(String[] args) { int i1=5,i2=10; int i= (i2++); System.out.println("i="+i1); System.o 阅读全文
posted @ 2017-03-12 16:27 大仁哥汪宝 阅读(99) 评论(0) 推荐(0) 编辑
摘要:public class TypeCast { public static void main(String[] args){ byte b=1; int i=b; float f=b; double d=b; char ch='c'; int i2=ch; System.out.println(" 阅读全文
posted @ 2017-03-12 16:16 大仁哥汪宝 阅读(256) 评论(0) 推荐(0) 编辑
摘要:public class substring { public static void main(String[] av) { String a = "Java is great."; System.out.println(a); String b= a.substring(5); System.o 阅读全文
posted @ 2017-03-11 21:59 大仁哥汪宝 阅读(93) 评论(0) 推荐(0) 编辑