
Java从入门到精通
由浅入深,实战演练叙述:基本知识→关键技术→高級运用→新项目实战演练,合乎认知能力规律性。
韩淼燃
最近在更新运维专栏。欢迎大家来点赞,关注。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
多线程的学习
public class ThreadTest extends Thread { private int count = 10; @Override public void run() { super.run(); while (true){ System.out.println(count); if(--count == 0){ return; .原创 2022-01-29 20:23:48 · 158 阅读 · 0 评论 -
枚举类型与泛型的学习
interface Constants { public static final int Constants_A = 1; public static final int Constants_B = 12;}public class ConstantsTest { enum Constants2{ Constants_A,Constants_B } public static void doit(int c){ switch.原创 2022-01-23 23:06:13 · 224 阅读 · 0 评论 -
反射的学习
public class Example_01 { String s; int i,i2,i3; private Example_01(){} protected Example_01(String s,int i){ this.s = s; this.i = i; } public Example_01(String... strings) throws NumberFormatException{ if(.原创 2022-01-23 19:23:46 · 4254 阅读 · 0 评论 -
IO的学习
import java.io.File;import java.io.FileInputStream;import java.io.FileOutputStream;//文件输入流和文件输出流public class FileStream { public static void main(String[] args) { File file = new File("word.txt"); try { FileOutputStream.原创 2022-01-15 21:18:33 · 223 阅读 · 0 评论 -
HashMap getOrDefault(key, defaultValue)
今天在学习算法的时候发现了一个java的奇淫技巧的函数。背景:给你一个字符串,找到它第一个不重复的字符,返回字符索引。目的:使用HashMap getOrDefault(key, defaultValue)函数,来找到第一个不重复的字符。过程:我给大家解释一下使用这个函数的解这个题的基本思路哈。就是定义一个hashmap函数map,key是字符,value是map.getOrDefault(字符,0)+1。为啥子要+1呢。函数的解释:getOrDefault() 方法获取原创 2022-01-10 15:47:16 · 374 阅读 · 0 评论 -
集合类的学习
import java.util.ArrayList;import java.util.Collection;import java.util.Iterator;//collection接口public class coll { public static void main(String[] args) { Collection<String> list = new ArrayList<>(); list.add("a"); .原创 2021-08-22 10:48:41 · 135 阅读 · 0 评论 -
swing的学习
/** * 1JFrame窗体 */import javax.swing.*;//导入awt包import java.awt.*;//导入swing包/** * 第一个窗体(JFrame窗体) */public class JFrameTest extends JFrame{//定义一个类继承HFrame类 public void CreateJFrame(String title) {//定义一个CreateJframe类 JFrame jf = new J.原创 2021-08-07 12:17:01 · 303 阅读 · 0 评论 -
java异常处理
此处是包。package error.test;public class MyError extends Exception { public MyError(String ErrorMessage){ super(ErrorMessage); }}import error.test.MyError;public class ErrorTest {// public static void main(String[] args) {// ..原创 2021-06-26 21:53:36 · 153 阅读 · 0 评论 -
java类的高级特性&包
这个com/lzw就是包。package com.lzw;public class Math { public void test1(){ System.out.println("this is math"); } public static void main(String[] args) { System.out.println("this not is java.lang.Math class ,so this is com.lzw..原创 2021-06-26 21:51:58 · 171 阅读 · 0 评论 -
java接口、继承、多态
public class Test extends Object{ public Test(){ } protected void doSomething(){ } protected Test dolt(){ return new Test(); }}public class Test2 extends Test { public Test2(){ super(); super.原创 2021-06-26 21:48:39 · 136 阅读 · 0 评论 -
java包装类
public class IntegetLearn { public static void main(String[] args) {// Integer number = new Integer("23");// System.out.println(number); String str[] = {"89", "12", "10", "18", "35"}; int sum = 0; for (int i = 0.原创 2021-06-26 21:44:13 · 129 阅读 · 0 评论 -
java类和对象
public class ClassLearn1 { /** * 类的使用 */ private String name; public String getName(){ int id = 0; setName("java"); return id + this.name; } private void setName(String name) { this.name = na.原创 2021-06-26 21:41:41 · 115 阅读 · 0 评论 -
java数组&一维数组&二维数组&数组的使用&排序
public class ArrayLearn1 { /** * 一维数组的使用 */ public static void main(String[] args) { int arr[] = new int[10];//声明数组,并且分配内存空间 for (int item: arr ) { System.out.println(item); } fo.原创 2021-06-26 21:40:03 · 189 阅读 · 0 评论 -
java字符串&字符串的使用&格式化字符串&正则&字符串生成器
public class Compound { public static void main(String args[]) { String a = "good"; System.out.println(a); char b[] = {'h','e','l','l','o'}; String s = new String(b); System.out.println(a); char d[] =.原创 2021-06-26 21:36:31 · 256 阅读 · 0 评论 -
java流程控制
public class Compound{ public static void main(String args[]) { int x = 10; int j = 40; { int y = 40; System.out.println(y); int z = 245; boolean b; { .原创 2021-06-26 21:32:13 · 90 阅读 · 0 评论 -
java基本数据类型
package Number;public class Frist { static String s1 = "你好"; static final double PI = 3.14;// int m = 123; public static void main(String[] args) { String s2 = "Java"; System.out.println(s1); System.out.prin.原创 2021-06-26 21:31:28 · 179 阅读 · 0 评论 -
第一个java程序
public class HelloJava{ public static void main(String[] args){ System.out.println("123123adasd"); }}原创 2021-06-26 21:30:38 · 121 阅读 · 0 评论