前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >专栏 >Java 实践

Java 实践

作者头像
Mirror王宇阳
发布于 2020-11-10 14:09:02
发布于 2020-11-10 14:09:02
41000
代码可运行
举报
运行总次数:0
代码可运行
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/**
  *宠物就是一个标准,包含多类宠物
  *定义宠物标准接口Pet
  *定义Cat和Dog两个Pet接口的子类
  *使用链表结构动态存储宠物信息
  *定义商店类(工厂类),负责宠物的上架(链表添加)、下架(链表删除)、查找(模糊查找)
  *
  *所有数据类型均为 接口————Pet 
  *
  *
  */
class Link {        //链表类(外部可调用)

         class Node {  //节点类,定义该内部类,只可服务于Link类

                   private Object data ;       //节点数据

                   private Node next ;           //引用关系(顺序)

                   public Node(Object data) {

                            this.data = data ;

                   }

 

                   public void addNode(Node newNode){

                            if ( this.next == null){        //下一个节点为空则设置下一个节点

                                     this.next = newNode ;

                            } else {      //若节点存在,则向后移

                                     this.next.addNode(newNode) ;

                            }

                   }

                  

                   public boolean containsNode(Object data) { 

                            //(如果比较的数据是对象,则定义一个对象比较的方法。)

                            if ( data.equals(this.data)) {     //对比data

                                     return true ;

                            } else {

                                     if ( this.next != null ) {       // 对比下一个data

                                               return this.next.containsNode(data) ;

                                     } else {

                                               return false ;

                                     }

                            }

                   }

 

                   public Object getNode(int index) { //索引查找

                            // 1 比较index和foot的值是否相等

                            // 2 将foot的内容自增 1

                            if ( Link.this.foot ++ == index) {         //对比当前节点的foot

                                     return this.data ;

                            } else {      //下一个节点

                                     return this.next.getNode(index) ;

                            }

                   }

 

                   public void setNode(int index , Object data) {

                            if ( Link.this.foot ++ == index ) {

                                     this.data = data ;     //内容修改(替换     )

                            } else {

                                     if ( this.next != null ) {

                                               this.next.setNode(index,data) ;

                                     }

                            }

                   }

 

                   // 要传递上一个节点以要删除的数据

                   public void removeNode( Node previous , Object data ) {

                            if ( data.equals(this.data)){//数据满足删除条件

                                     previous.next = this.next ; //上一个节点的next指向当前的next(空出当前节点)

                            } else {      // 继续匹配查询删除

                                     if(this.next != null) {

                                               this.next.removeNode(this , data) ;//this表示当前对象,将this给previous

                                                        // 因为previous接收的是上一个对象。

                                     }

                            }

                   }

 

                   public void toArrayNode() {

                            Link.this.retArray[Link.this.foot ++] = this.data ;

                            if ( this.next != null ) {

                                     this.next.toArrayNode() ;

                            }

                   }

                  

         }

 

         /* ========================================================================== */

 

         private Node root ;  //根节点

         private int count = 0 ; //保存元素的个数

         private int foot = 0 ; //保存链表的索引编号

         private Object [] retArray ; //对象数组

 

         public void add(Object data) { //数据添加

                   Node newNode = new Node(data) ;

                   if ( this.root == null ){//无根节点,保存根节点

                            this.root = newNode ;

                   } else {      //向Node调用

                            this.root.addNode(newNode) ;

                   }

                   this.count ++ ; //每一个保存后数据量自加 1

         }

 

         public int size() {       //判断返回链表数据数量

                   return this.count ;

         }

 

         public boolean isEmpty() {        //判断链表是否为空

                   return this.count == 0 ;   // 根据链表数量判断

         }

 

         public boolean contains(Object data) { //查询数据是否存在

                   if ( data == null || this.root == null ) {       //查找数据为空则false

                            return false ;

                   }

                   return this.root.containsNode(data) ;    //不为空则调用Node查找数据;

         }

 

         public Object get(int index) {   //设置索引目标 index

                   if ( index > this.count ) {

                            return null ;

                   }

                            this.foot = 0 ;   //索引归零,表示从左往右查找

                            return this.root.getNode(index) ;   //调用getNode()查找

         }

 

         public void set(int index , Object data) {//修改链表数据内容

                   if ( data == null || this.root == null ) {

                            return ;

                   }

                   this.foot = 0 ;   // 重置foot,便于查找内容

                   this.root.setNode(index,data) ;       //调用Node修改

         }

        

         /*

                   如果要删除的是根节点:root指向下一个节点即可

                   如果删除的不是根节点:删除的前一个节点,下一个节点指向删除的下一个节点

                   删除数据的形式:当前节点的上一个节点next = 当前节点的next

 

                   需要设置一个方法专门处理非根节点的删除(removeNode()方法)

         */

         public void remove(Object data) {

                   if ( this.contains(data)) {//contains() 判断数据是否存在

                            // 判断删除的数据是不是根节点数据

                            // root是Node类的对象,此处直接访问了Node对象的私有属性 data

                            if ( data.equals(this.root.data)) {

                                     this.root = this.root.next ;       //空出当前节点(改变根节点)

                            } else {

                                     this.root.next.removeNode(this.root , data) ;

                            }

                            this.count -- ;   //链表个数减一

                   }

         }

          

         //      首先开辟一个数组空间,空间 == count

 

         public Object [] toArray() { //将链表以对象数组形式返回

                   if (this.root == null ) {

                            return null ;

                   }

                   this.foot = 0 ; //下标控制

                   this.retArray = new Object [this.count] ; //开辟一个数组

                   this.root.toArrayNode() ; //Node处理

 

                   return retArray ;
         }
}


interface Pet { // 宠物标准接口Pet
    public String getName() ;//得到名字
    public int getAge() ;//得到年龄
}

class PetShop {  // 商店
    private Link pets = new Link() ;//保存的宠物信息 ** 利用链表存储结构来保存信息
    public void add(Pet pet) {//上架宠物信息pet        ** 调用链表add()来添加数据
        this.pets.add(pet) ;//向链表中保存数据pet
    }
    public void delete(Pet pet) { // 下架
        this.pets.remove(pet) ; //从链表中删除数据pet
    }
    public Link search(String keyWord) {
        Link result = new Link() ;
        // 将集合变为对象数组的形式返回,因为保存的是Object
        // 但是真正要查询的数据在Pet接口对象的getName() 方法中
        // 所以有必要向下转型
        Object obj [] = this.pets.toArray() ;
        for ( int x = 0 ; x < obj.length ; x ++ ) {
            Pet p = (Pet) obj[x] ; //向下转型
            if ( p.getName().contains(keyWord)) { //查询到的
                result.add(p) ;
            }
        }
        return result ;
    }
}

class Cat implements Pet {  // Cat子类 实现 Pet接口
    private String name ;
    private int age ;
    public Cat(String name , int age) {
        this.name = name ;
        this.age = age ;
    }
    public boolean equals(Object obj) { // 对象判断
        if (this==obj) {
            return true ;
        }
        if (obj==null) {
            return false ;
        }
        if (!(obj instanceof Cat)) {
            return false ;
        }
        Cat c = (Cat) obj ;
        if ( this.name.equals(c.name) && this.age == c.age ) {
            return true ;
        }
        return false ;
    }
    public String toString() {
        return "Name:" + this.name + "Age:" + this.age ;
    }

    public String getName() {
        return this.name ;
    }
    public int getAge() {
        return this.age ;
    }
}

class Dog implements Pet {  // Dog子类 实现 Pet接口
    private String name ;
    private int age ;
    public Dog(String name , int age) {
        this.name = name ;
        this.age = age ;
    }
    public boolean equals(Object obj) { //对象判断
        if (this==obj) {
            return true ;
        }
        if (obj==null) {
            return false ;
        }
        if (!(obj instanceof Dog)) {
            return false ;
        }
        Dog c = (Dog) obj ;
        if ( this.name.equals(c.name) && this.age == c.age ) {
            return true ;
        }
        return false ;
    }
    public String toString() {
        return "Name:" + this.name + "Age:" + this.age ;
    }
    public String getName() {
        return this.name ;
    }
    public int getAge() {
        return this.age ;
    }
}


public class TestDemo {
    public static void main(String [] args) {
        PetShop shop = new PetShop() ;
        shop.add(new Cat("Ha",1));
        shop.add(new Cat("Ea",2));
        shop.add(new Cat("Lw",3));
        shop.add(new Cat("O",4));
        shop.add(new Dog("Wa",5));
        shop.add(new Dog("O",6));
        shop.add(new Dog("Rw",7));
        shop.add(new Dog("D",8));

        Link all = shop.search("a") ;//模糊查询
        Object obj [] = all.toArray() ;
        for ( int x = 0 ; x < obj.length ; x++ ) {
            System.out.println(obj[x]) ;
        }
    
代码语言:javascript
代码运行次数:0
运行
AI代码解释
复制
/**
  *宠物就是一个标准,包含多类宠物
  *定义宠物标准接口Pet
  *定义Cat和Dog两个Pet接口的子类
  *使用链表结构动态存储宠物信息(链表中存放的是对象地址)
  *定义商店类(工厂类),负责宠物的上架(链表添加)、下架(链表删除)、查找(模糊查找)
  *
  *所有数据类型均为 接口————Pet 
  *
  */
class Link {        //链表类(外部可调用)

         class Node {  //节点类,定义该内部类,只可服务于Link类

                   private Object data ;       //节点数据

                   private Node next ;           //引用关系(顺序)

                   public Node(Object data) {

                            this.data = data ;

                   }

 

                   public void addNode(Node newNode){

                            if ( this.next == null){        //下一个节点为空则设置下一个节点

                                     this.next = newNode ;

                            } else {      //若节点存在,则向后移

                                     this.next.addNode(newNode) ;

                            }

                   }

                  

                   public boolean containsNode(Object data) { 

                            //(如果比较的数据是对象,则定义一个对象比较的方法。)

                            if ( data.equals(this.data)) {     //对比data

                                     return true ;

                            } else {

                                     if ( this.next != null ) {       // 对比下一个data

                                               return this.next.containsNode(data) ;

                                     } else {

                                               return false ;

                                     }

                            }

                   }

 

                   public Object getNode(int index) { //索引查找

                            // 1 比较index和foot的值是否相等

                            // 2 将foot的内容自增 1

                            if ( Link.this.foot ++ == index) {         //对比当前节点的foot

                                     return this.data ;

                            } else {      //下一个节点

                                     return this.next.getNode(index) ;

                            }

                   }

 

                   public void setNode(int index , Object data) {

                            if ( Link.this.foot ++ == index ) {

                                     this.data = data ;     //内容修改(替换     )

                            } else {

                                     if ( this.next != null ) {

                                               this.next.setNode(index,data) ;

                                     }

                            }

                   }

 

                   // 要传递上一个节点以要删除的数据

                   public void removeNode( Node previous , Object data ) {

                            if ( data.equals(this.data)){//数据满足删除条件

                                     previous.next = this.next ; //上一个节点的next指向当前的next(空出当前节点)

                            } else {      // 继续匹配查询删除

                                     if(this.next != null) {

                                               this.next.removeNode(this , data) ;//this表示当前对象,将this给previous

                                                        // 因为previous接收的是上一个对象。

                                     }

                            }

                   }

 

                   public void toArrayNode() {

                            Link.this.retArray[Link.this.foot ++] = this.data ;

                            if ( this.next != null ) {

                                     this.next.toArrayNode() ;

                            }

                   }

                  

         }

 

         /* ========================================================================== */

 

         private Node root ;  //根节点

         private int count = 0 ; //保存元素的个数

         private int foot = 0 ; //保存链表的索引编号

         private Object [] retArray ; //对象数组

 

         public void add(Object data) { //数据添加

                   Node newNode = new Node(data) ;

                   if ( this.root == null ){//无根节点,保存根节点

                            this.root = newNode ;

                   } else {      //向Node调用

                            this.root.addNode(newNode) ;

                   }

                   this.count ++ ; //每一个保存后数据量自加 1

         }

 

         public int size() {       //判断返回链表数据数量

                   return this.count ;

         }

 

         public boolean isEmpty() {        //判断链表是否为空

                   return this.count == 0 ;   // 根据链表数量判断

         }

 

         public boolean contains(Object data) { //查询数据是否存在

                   if ( data == null || this.root == null ) {       //查找数据为空则false

                            return false ;

                   }

                   return this.root.containsNode(data) ;    //不为空则调用Node查找数据;

         }

 

         public Object get(int index) {   //设置索引目标 index

                   if ( index > this.count ) {

                            return null ;

                   }

                            this.foot = 0 ;   //索引归零,表示从左往右查找

                            return this.root.getNode(index) ;   //调用getNode()查找

         }

 

         public void set(int index , Object data) {//修改链表数据内容

                   if ( data == null || this.root == null ) {

                            return ;

                   }

                   this.foot = 0 ;   // 重置foot,便于查找内容

                   this.root.setNode(index,data) ;       //调用Node修改

         }

        

         /*

                   如果要删除的是根节点:root指向下一个节点即可

                   如果删除的不是根节点:删除的前一个节点,下一个节点指向删除的下一个节点

                   删除数据的形式:当前节点的上一个节点next = 当前节点的next

 

                   需要设置一个方法专门处理非根节点的删除(removeNode()方法)

         */

         public void remove(Object data) {

                   if ( this.contains(data)) {//contains() 判断数据是否存在

                            // 判断删除的数据是不是根节点数据

                            // root是Node类的对象,此处直接访问了Node对象的私有属性 data

                            if ( data.equals(this.root.data)) {

                                     this.root = this.root.next ;       //空出当前节点(改变根节点)

                            } else {

                                     this.root.next.removeNode(this.root , data) ;

                            }

                            this.count -- ;   //链表个数减一

                   }

         }

          

         //      首先开辟一个数组空间,空间 == count

 

         public Object [] toArray() { //将链表以对象数组形式返回

                   if (this.root == null ) {

                            return null ;

                   }

                   this.foot = 0 ; //下标控制

                   this.retArray = new Object [this.count] ; //开辟一个数组

                   this.root.toArrayNode() ; //Node处理

 

                   return retArray ;
         }
}

interface Pet { // 宠物标准接口Pet
    public String getName() ;//得到名字
    public int getAge() ;//得到年龄
}

class PetShop {  // 商店 
    private Link pets = new Link() ;//保存的宠物信息 ** 利用链表存储结构来保存信息
    public void add(Pet pet) {//上架宠物信息pet        ** 调用链表add()来添加数据
        this.pets.add(pet) ;//向链表中保存数据pet
    }
    public void delete(Pet pet) { // 下架
        this.pets.remove(pet) ; //从链表中删除数据pet
    }
    public Link search(String keyWord) {
        Link result = new Link() ;
        // 将集合变为对象数组的形式返回,因为保存的是Object
        // 但是真正要查询的数据在Pet接口对象的getName() 方法中
        // 所以有必要向下转型
        Object obj [] = this.pets.toArray() ;
        // 核心思维:将查询条件与链表中的name做比较,若查到则将该链表的地址存入新的链表中
        for ( int x = 0 ; x < obj.length ; x ++ ) {
            Pet p = (Pet) obj[x] ; //向下转型
            if ( p.getName().contains(keyWord)) { //查询到的 ** char.contains(str)方法:如果当前char中包含str则返回true
                result.add(p) ; // 开辟新的链表 result;并将查到的符合条件的链表地址存入链表result
            }
        }
        return result ; // 返回链表 result
    }
}

class Cat implements Pet {  // Cat子类 实现 Pet接口
    private String name ;
    private int age ;
    public Cat(String name , int age) {
        this.name = name ;
        this.age = age ;
    }
    public boolean equals(Object obj) { // 对象判断
        if (this==obj) {
            return true ;
        }
        if (obj==null) {
            return false ;
        }
        if (!(obj instanceof Cat)) {
            return false ;
        }
        Cat c = (Cat) obj ;
        if ( this.name.equals(c.name) && this.age == c.age ) {
            return true ;
        }
        return false ;
    }
    public String toString() {
        return "Name:" + this.name + "Age:" + this.age + "Cat";
    }

    public String getName() {
        return this.name ;
    }
    public int getAge() {
        return this.age ;
    }
}

class Dog implements Pet {  // Dog子类 实现 Pet接口
    private String name ;
    private int age ;
    public Dog(String name , int age) {
        this.name = name ;
        this.age = age ;
    }
    public boolean equals(Object obj) { //对象判断
        if (this==obj) {
            return true ;
        }
        if (obj==null) {
            return false ;
        }
        if (!(obj instanceof Dog)) {
            return false ;
        }
        Dog c = (Dog) obj ;
        if ( this.name.equals(c.name) && this.age == c.age ) {
            return true ;
        }
        return false ;
    }
    public String toString() {
        return "Name:" + this.name + "Age:" + this.age + "Dog";
    }
    public String getName() {
        return this.name ;
    }
    public int getAge() {
        return this.age ;
    }
}


public class TestDemo {
    public static void main(String [] args) {
        PetShop shop = new PetShop() ;
        shop.add(new Cat("Ha",1));
        shop.add(new Cat("Ea",2));
        shop.add(new Cat("Lw",3));
        shop.add(new Cat("O",4));
        shop.add(new Dog("Wa",5));
        shop.add(new Dog("O",6));
        shop.add(new Dog("Rw",7));
        shop.add(new Dog("D",8));

        Link all = shop.search("a") ;//模糊查询 ** all接受shop.search()返回的链表对象
        Object obj [] = all.toArray() ; //返回对象数组 ** 链表当中存放的是子类的堆内存地址(对象地址)
        for ( int x = 0 ; x < obj.length ; x++ ) {
            System.out.println(obj[x].toString()) ; 
            // 由于Object类的toString()方法特性,只要子类中定义了toSting就会按照覆写的方法执行
        }
    }
}
本文参与 腾讯云自媒体同步曝光计划,分享自作者个人站点/博客。
原始发表:2019-05-01 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体同步曝光计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
暂无评论
推荐阅读
编辑精选文章
换一批
Java 单向链表学习
链表等同于动态的数组;可以不同设定固定的空间,根据需要的内容动态的改变链表的占用空间和动态的数组同一形式;链表的使用可以更加便于操作。
Mirror王宇阳
2020/11/10
9460
Java Object类
Object时所有类的父类,任何一个类在定义的时候没有明确的继承一个父类,那么它就是object类的子类;即:class Book {} == class Book extends Object {} 定义作用是一样的。
Mirror王宇阳
2020/11/10
6300
Java链表的基本使用
链表是一种根据元素节点逻辑关系排列起来的一种数据结构。利用链表可以保存多个数据,这一点类似于数组的概念,但是数组本身有一个缺点—— 数组的长度固定,不可改变,在长度固定的情况下首选的肯定是数组,但是在现实的开发之中往往要保存的内容长度是不确定的,那么此时就可以利用链表这样的结构来代替数组的使用。
全栈程序员站长
2022/08/18
4980
数据结构——单链表的代码实现(Java)
上接 数据结构——线性表. 这篇文章 1、结点类: 单链表是由一个一个结点组成的,因此,要设计单链表类,必须先设计结点类。结点类的成员变量有两个:一个是数据元素,另一个是表示下一个结点的对象引用(即指针)。 步骤如下: (1)头结点的构造(设置指针域即可) (2)非头结点的构造 (3)获得当前结点的指针域 (4)获得当前结点数据域的值 (5)设置当前结点的指针域 (6)设置当前结点数据域的值 注:类似于get和set方法,成员变量是数据域和指针域。 代码实现: (1)List.java:(链表本身也是线性表,只不过物理存储上不连续)
向着百万年薪努力的小赵
2022/12/02
4740
数据结构——单链表的代码实现(Java)
Java 比较器
比较器 Arrays 类 主要功能: 完成所有与数组有关的操作的工具类 二分查找: 在一个有序的数字序列中进行二分查找 public static int binarySearch(数据类型 [] a , 数据类型 key) 案例实现 public class TestDemo { public static void main(String [] args) throws ParseException { int date [] = new int [] {1,4,2,5,7,4,3,8} ;
Mirror王宇阳
2020/11/12
1.2K0
Java单向链表实现
package com.pku.wuyu.io; class Link{ // 链表的完成类 class Node{ // 保存每一个节点,此处为了方便直接定义成内部类 private String data ; // 保存节点的内容 private Node next ; // 保存下一个节点 public Node(String data){ this.data = data ; // 通过构造方法设置节点内容 } public void add(Node newNod
葆宁
2019/04/18
1.2K0
Java单向链表实现
宠物商店
interface Pet{ // 定义宠物接口 public String getName() ; public String getColor() ; public int getAge() ; } class Cat implements Pet{ // 猫是宠物,实现接口 private String name ; // 宠物名字 private String color ; // 宠物颜色 private int age ; // 宠物年龄 public Cat(String na
葆宁
2019/04/18
1.1K0
宠物商店
Java之手写LinkedList(中)
由于今天要写add(int index,T t)方法,索引会把内部类中的递归的get(int index)改造成获取节点,不直接获取元素,外部类的get方法也会稍加改动。
用户5224393
2019/08/20
4300
Java之手写LinkedList(下)
返回节点对象element在链表中首次出现的位置,如果链表中无此节点的对象则返回-1
用户5224393
2019/08/20
7840
数据结构Java实现:循环链表和双向链表
上篇教程给大家分享了单链表的概念,以及如何用 Java 实现一个单链表的结构:数据结构Java实现:单链表。单链表是最基础的一种链表结构,在实际开发中的使用有一些局限性,比如只能单向往后查找节点,如果需要找到某元素的前驱节点,单链表是无法实现的,今天来给大家分享另外两个复杂一些的链表结构:循环链表和双向链表。
南风
2019/06/05
3.5K0
数据结构Java实现:循环链表和双向链表
JAVA-链表实例
PS:这样写,只是简单的实现某个数据类型的链表.在后面我们学习了JAVA-Object类,由于Object类是所有类的超类,所以,我们可以来实现满足所有类型的链表
诺谦
2019/05/24
9310
数据结构(数组、链表、栈、队列、树)
二叉树(Binary tree)是树形结构的一个重要类型。二叉树特点是每个结点最多只能有两棵子树,且有左右之分。许多实际问题抽象出来的数据结构往往是二叉树形式,二叉树的存储结构及其算法都较为简单,因此二叉树显得特别重要。
鱼找水需要时间
2023/04/28
3890
数据结构(数组、链表、栈、队列、树)
数据结构-Java逆天操作
学编程的小程
2023/10/11
1890
数据结构-Java逆天操作
大厂面试:JavaScript各种源码解析
func 是要调用的函数,是由 context 调用,func 的指向 context,所以关注点在 context 指向
Javanx
2019/09/04
7400
18 张图带你彻底认识这些数据结构
数据结构是计算机存储、组织数据的方式。数据结构是指相互直接存在一种或多种特殊关系的数据元素的集合。通常情况下,精心选择数据结构可以带来更高的运行或者存储效率。作为一名程序猿,更需要了解下数据结构。
五分钟学算法
2019/05/06
5460
18 张图带你彻底认识这些数据结构
Java之手写LinkedList改造
改造Iterator /** * 返回在此列表中的元素上进行迭代的迭代器(按适当顺序)。 * 此实现仅返回列表的一个列表迭代器。 * @return */ public Iterator<T> iterator() { /** * 这里我们回顾一下匿名内部类 */ return new Iterator<T>() { /** * 第一次记录first节点 */ private
用户5224393
2019/08/20
4010
「中高级前端」窥探数据结构的世界- ES6版
数据结构是在计算机中组织和存储数据的一种特殊方式,使得数据可以高效地被访问和修改。更确切地说,数据结构是数据值的集合,表示数据之间的关系,也包括了作用在数据上的函数或操作。
Nealyang
2019/09/29
9660
「中高级前端」窥探数据结构的世界- ES6版
算法系列02
/**  * 递归:在方法体重调用本身这个方法  **/ public class DiGui {     public static void main(String[] args) {         DiGui.test(0);     }     public static void test(int value){         if(value<100){             System.out.println("第一步:"+value);             test(++value);             System.out.println("第二步:"+value);             System.out.println("第三步:"+value);         }     }
Dlimeng
2023/06/29
1350
Java-线索二叉树的实现
leehao
2025/02/11
560
数据结构Java实现:单链表
对一名程序猿来讲,使用哪种语言来开发程序不是最重要的,数据结构和算法才是核心,是程序猿的内功,最终决定你的技术上限。如果你想拔高自己的水平,提高核心竞争力,数据结构和算法是必须要学的,今天就带大家一起来学习链表的概念,并用 Java 语言实现一个链表的结构。
南风
2019/05/31
1.2K0
数据结构Java实现:单链表
相关推荐
Java 单向链表学习
更多 >
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档