07 2021 档案

摘要:1,新建Application类,作为程序的入口 package oop.demo02; public class Application { public static void main(String[] args) { /* Person类; */ // new 实例化了一个对象 Person 阅读全文
posted @ 2021-07-31 17:13 阿向向 阅读(39) 评论(0) 推荐(0)
摘要:##1,新建Application类,作为程序的入口 package oop.demo02; public class Application { public static void main(String[] args) { //类,抽象的,需要实例化 Student xiaoming = ne 阅读全文
posted @ 2021-07-31 16:18 阿向向 阅读(162) 评论(0) 推荐(0)
摘要:##1、创建一个Student类 ,进行调用 package oop; //学生类; public class Student { //定义一个方法 // 非静态方法 public void say(){ System.out.println("同学们开始说话!!!"); } } ##1、创建Dem 阅读全文
posted @ 2021-07-31 13:16 阿向向 阅读(638) 评论(0) 推荐(0)
摘要:package oop; import java.io.IOException; //Demo01 类 public class Demo01 { // main 方法; public static void main(String[] args) { } /* 修饰符 返回值类型 方法名(...) 阅读全文
posted @ 2021-07-31 12:37 阿向向 阅读(26) 评论(0) 推荐(0)
摘要:##1,稀疏数组的介绍 ##2,练习 ##3,编码 package array; /* 稀疏数组 数据结构 */ public class Demo08 { public static void main(String[] args) { // 创建一个二维数组;11*11 0:没有棋子 1:黑棋 阅读全文
posted @ 2021-07-30 19:25 阿向向 阅读(39) 评论(0) 推荐(0)
摘要:package array; import java.util.Arrays; /* 冒泡排序 */ public class Demo07 { final static int[] result={4,564,54,54,5,4,54,54,54,54,54,65,46,58,7,54,67,8, 阅读全文
posted @ 2021-07-30 18:46 阿向向 阅读(317) 评论(0) 推荐(0)
摘要:package array; import java.util.Arrays; public class Demo06 { final static int[] a = {1, 2, 13, 45, 45, 8, 4, 5465, 46, 54, 564, 1, 999, 54, 1, 54, 12 阅读全文
posted @ 2021-07-30 18:03 阿向向 阅读(54) 评论(0) 推荐(0)
摘要:package array; public class Demo05 { // 4行2列 // [4][2] /* 1,2 array[0] 2,3 array[1] 3,4 array[2] 4,5 array[3] */ final static int[][] array = {{1, 2}, 阅读全文
posted @ 2021-07-30 12:50 阿向向 阅读(111) 评论(0) 推荐(0)
摘要:package array; public class Demo04 { final static int[] arrays = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; public static void main(String[] args) { printArray( 阅读全文
posted @ 2021-07-30 12:14 阿向向 阅读(76) 评论(0) 推荐(0)
摘要:package array; public class Demo03 { public static void main(String[] args) { int[] arrays = {1, 2, 3, 4, 5, 6,7, 8, 9, 10, 11, 12, 13, 14}; test(); p 阅读全文
posted @ 2021-07-30 08:32 阿向向 阅读(88) 评论(0) 推荐(0)
摘要:package array; /** * 数组的三种初始化 */ public class Demo02 { public static void main(String[] args) { test(); test2(); } public static void test2() { int[] 阅读全文
posted @ 2021-07-30 08:30 阿向向 阅读(91) 评论(0) 推荐(0)
摘要:package array; public class Demo01 { public static void main(String[] args) { test(); test3(); } public static void test() { int[] num1;//定义 声明数组 num1 阅读全文
posted @ 2021-07-30 08:29 阿向向 阅读(45) 评论(0) 推荐(0)
摘要:package method; /* 可变参数; 不定项;‘ */ public class Demo03 { public static void main(String[] args) { Demo03 demo03 = new Demo03(); demo03.test(1,2,3,4,7,5 阅读全文
posted @ 2021-07-30 08:28 阿向向 阅读(56) 评论(0) 推荐(0)
摘要:package method; /** * 阶乘 * <p> * <p> * 1! 1 * 2! 2*1 * 3! 3*2*1 * 5! 5*4*3*2*1 */ public class Demo06 { public static void main(String[] args) { Syste 阅读全文
posted @ 2021-07-30 08:26 阿向向 阅读(120) 评论(0) 推荐(0)
摘要:package method; public class Demo04 { public static void main(String[] args) { Demo04 demo04 = new Demo04(); demo04.printMax(456,454,4654.4,6.454,6544 阅读全文
posted @ 2021-07-30 08:23 阿向向 阅读(100) 评论(0) 推荐(0)
摘要:package method; public class Demo01 { public static void main(String[] args) { // 实参 int sum = add(1, 4); System.out.println(sum);//5 // int max = max 阅读全文
posted @ 2021-07-30 08:21 阿向向 阅读(29) 评论(0) 推荐(0)
摘要:package struct; public class TextDemo { public static void main(String[] args) { text(); text2(); } public static void text() { //打印三角形 5行 for (int i 阅读全文
posted @ 2021-07-29 09:59 阿向向 阅读(154) 评论(0) 推荐(0)
摘要:package struct; /* 质数 101 150 的所有质数 */ public class Demo11 { public static void main(String[] args) { outer: for (int i = 101; i < 150; i++) { for (in 阅读全文
posted @ 2021-07-29 09:57 阿向向 阅读(208) 评论(0) 推荐(0)
摘要:package struct; public class Demo09 { public static void main(String[] args) { text(); } public static void text() { int[] nums = {10, 20, 30, 40, 50, 阅读全文
posted @ 2021-07-29 09:55 阿向向 阅读(77) 评论(0) 推荐(0)
摘要:package struct; public class Demo08 { public static void main(String[] args) { for (int j = 1; j <= 9; j++) { for (int i = 1; i <= j; i++) { System.ou 阅读全文
posted @ 2021-07-29 09:49 阿向向 阅读(169) 评论(0) 推荐(0)
摘要:package struct; public class Demo07 { public static void main(String[] args) { int a = 1; int count=0; while (a <= 1000) { if (a % 5 == 0) { System.ou 阅读全文
posted @ 2021-07-29 09:48 阿向向 阅读(367) 评论(0) 推荐(0)
摘要:package struct; public class Demo06 { public static void main(String[] args) { for (int i = 1; i <= 1000; i++) { if (i % 5 == 0) { System.out.print(i 阅读全文
posted @ 2021-07-29 09:47 阿向向 阅读(410) 评论(0) 推荐(0)
摘要:package struct; public class Demo05 { public static void main(String[] args) { int oddSum = 0; int evenSum = 0; for (int i = 0; i <= 100; i++) { if (i 阅读全文
posted @ 2021-07-29 09:45 阿向向 阅读(965) 评论(0) 推荐(0)
摘要:package struct; public class Demo04 { public static void main(String[] args) { text(); text2(); text3(); } public static void text() { int i = 0; int 阅读全文
posted @ 2021-07-29 09:43 阿向向 阅读(69) 评论(0) 推荐(0)
摘要:package struct; public class Demo03 { public static void main(String[] args) { text(); System.out.println(" "); text2(); } public static void text() { 阅读全文
posted @ 2021-07-29 09:41 阿向向 阅读(683) 评论(0) 推荐(0)
摘要:package struct; import java.util.Scanner; public class Demo02 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Sys 阅读全文
posted @ 2021-07-29 09:38 阿向向 阅读(41) 评论(0) 推荐(0)
摘要:package struct; import java.util.Scanner; public class Demo01 { final static Scanner scanner = new Scanner(System.in); public static void main(String[ 阅读全文
posted @ 2021-07-29 09:37 阿向向 阅读(40) 评论(0) 推荐(0)
摘要:package scanner; import java.util.Scanner; public class Demo03{ public static void main(String[] args) { Scanner scanner = new Scanner(System.in); Sys 阅读全文
posted @ 2021-07-29 09:35 阿向向 阅读(34) 评论(0) 推荐(0)
摘要:package scanner; import java.util.Scanner; public class Demo02 { final static Scanner scanner = new Scanner(System.in); public static void main(String 阅读全文
posted @ 2021-07-29 09:34 阿向向 阅读(46) 评论(0) 推荐(0)
摘要:package scanner; import java.util.Scanner; public class Demo01 { public static void main(String[] args) { scanner(); scanner2(); scanner3(); } public 阅读全文
posted @ 2021-07-29 09:32 阿向向 阅读(43) 评论(0) 推荐(0)
摘要:package operator; public class Demo04 { public static void main(String[] args) { text(); text2(); } public static void text() { int a = 10; int b = 20 阅读全文
posted @ 2021-07-28 13:52 阿向向 阅读(209) 评论(0) 推荐(0)
摘要:package operator; public class Demo03 { public static void main(String[] args) { text(); text2(); text3(); } public static void text3(){ //位运算 /* A = 阅读全文
posted @ 2021-07-28 13:51 阿向向 阅读(43) 评论(0) 推荐(0)
摘要:package operator; public class Demo02 { public static void main(String[] args) { text0(); text(); text2(); text3(); } public static void text3(){ bool 阅读全文
posted @ 2021-07-28 13:50 阿向向 阅读(481) 评论(0) 推荐(0)
摘要:package operator; public class Demo01 { public static void main(String[] args) { int a=10; int b=20; int c=30; int d=40; System.out.println(a+b);//30 阅读全文
posted @ 2021-07-28 13:49 阿向向 阅读(447) 评论(0) 推荐(0)
摘要:package base; public class Demo01 { String name; int age; final static Double Pi=3.1415962; final Double score=99.0; public static void main(String[] 阅读全文
posted @ 2021-07-28 13:47 阿向向 阅读(44) 评论(0) 推荐(0)