
CS61B
kian240802
I will find my way
展开
-
Interfaces和Abstract classes的比较
interface:All methods must be public.All variables must be public static final.Cannot be instantiatedAll methods are by default abstract unless specified to be defaultCan implement more than one interface per classabstract class:Methods can be pu原创 2020-08-02 18:00:10 · 177 阅读 · 0 评论 -
Type Checking and Casting
You may be wondering, how does Java know which print() to call? Good question. Java is able to do this due to something called dynamic method selection.We know that variables in java have a type.List61B<String> lst = new SLList<String>();In原创 2020-07-26 17:46:33 · 277 阅读 · 0 评论 -
Lab 3: Unit Testing with JUnit, Debugging
In this lab, you will learn about Unit Testing, JUnit, the 61B style checker, and we’ll also get a bit more debugging experience.If you just want to use the renderer that you already selected, you can bypass having to pick between the two renderers in any原创 2020-07-26 01:01:32 · 195 阅读 · 0 评论 -
CS61B Discussion05
目录一道不明白意思的题目经常要犹豫很久担心写错的删重一道不明白意思的题目经常要犹豫很久担心写错的删重原创 2020-07-24 16:55:47 · 176 阅读 · 0 评论 -
LinkedList和Arrays的练习
LinkedList练习)插入节点在原有链表的基础上逆转元素顺序插入节点在以下代码的基础上完成插入节点的功能。例如:5–6--2,insert (10,1) result in 5–10–6--2.这里的position是从0开始的public class SLList{ private class IntNode{ public int item; public IntNode next; public IntNode(int item, IntNode next){ thi原创 2020-07-11 01:48:33 · 171 阅读 · 0 评论 -
CS61B project0实验记录
1.copy一个行星构造函数不会写2.常数用 static final 修饰比较好3.java支持科学记数法,例如 1.03e-7;4.foreach循环的使用 for( type name : arrayname);原创 2020-07-23 18:40:57 · 1182 阅读 · 1 评论 -
overriding 和 overloading
“老是忘记这个…”if a subclass has a method with the exact same signature as in the “superclass”, we say the subclass overrides the method.Methods with the same name but different signatures are overloaded.原创 2020-07-12 11:42:27 · 164 阅读 · 0 评论