摘要: public class Digui{ public static void main(String args[]){ System.out.println("计算结果:"+ sum(100)) ; //调用操作 } public static int sum(int num){ //定义方法用于求 阅读全文
posted @ 2017-04-13 17:19 大仁哥汪宝 阅读(271) 评论(0) 推荐(0) 编辑
摘要: public class Digui1 { int sum=0; int a=2; public void sum() { sum+=a; a++; if(a<=100) { sum();//调用自身实现递归 } } public static void main(String[] args) { 阅读全文
posted @ 2017-04-13 17:19 大仁哥汪宝 阅读(119) 评论(0) 推荐(0) 编辑
摘要: public class 逆序 { public static void main(String[] args) { // TODO 自动生成的方法存根 int[] grade = {15,12,9,6,3}; int m; for(int i = 0; i < 2; i++){ m = grade 阅读全文
posted @ 2017-04-13 17:17 大仁哥汪宝 阅读(178) 评论(0) 推荐(0) 编辑
摘要: package org.OverWrite;class Person{ private String name; private int age; public void setName(String name){ this.name=name; } public void setAge(int a 阅读全文
posted @ 2017-04-13 17:16 大仁哥汪宝 阅读(107) 评论(0) 推荐(0) 编辑
摘要: class Box{ double width; double depth; double height; Box(){ width=0;height=0;depth=0; } Box(double w,double h,double d){ width=w;depth=d;height = h; 阅读全文
posted @ 2017-04-13 17:15 大仁哥汪宝 阅读(148) 评论(0) 推荐(0) 编辑
摘要: class SuperClass{ private int n; SuperClass(){ System.out.println("SuperClass()"); } SuperClass(int n){ System.out.println("SuperClass("+n+")"); this. 阅读全文
posted @ 2017-04-13 17:15 大仁哥汪宝 阅读(234) 评论(0) 推荐(0) 编辑
摘要: class Person{ public String name; Person(String name){ this.name=name; }}class Student extends Person{ public int studentId; Student(String str,int id 阅读全文
posted @ 2017-04-13 17:14 大仁哥汪宝 阅读(438) 评论(0) 推荐(0) 编辑
摘要: package org.OverWrite;class Person{ private String name; private int age; public void setName(String name){ this.name=name; } public void setAge(int a 阅读全文
posted @ 2017-04-01 22:27 大仁哥汪宝 阅读(116) 评论(0) 推荐(0) 编辑
摘要: 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 大仁哥汪宝 阅读(175) 评论(0) 推荐(0) 编辑