Containers in Depth Full container taxonomy You can usually ignore any class that begins with "Abstract." Filling containers This fill( ) just duplicates a single object reference throughout the container. In addition, it only works for List obj…
(1)abstrac关键字类修饰的类是抽象类,用abstract修饰的方法是抽象方法: (2)含有抽象方法的类必须被定义为抽象类: (3)抽象类必须被继承,抽象方法必须被重写(或者将子类也声明为抽象类): (4)抽象类不能被实例化: (5)抽象方法只需声明,不需实现.如:public abstract void enjoy();//抽象方法 例如:JAVA笔记9中可以将Animal定义为抽象类(仅改变Animal的定义即可). public class TestAnimal{ public st…
1. 可以参照之前写的笔记: Android(java)学习笔记167:Java中操作文件的类介绍(File + IO流) 2. FileOutputStream(常用的)构造方法: FileOutputStream(File file) Constructs a new FileOutputStream on the File file. FileOutputStream(String filename) Constructs a new FileO…
package com.yfs.javase; public class ParamDemo { public static void main(String[] args) { int a = 3, b = 5; change(a,b); System.out.println("a = " + a + " b = " + b); Point p = new Point(); p.x = 10; p.y = 20; change(p); System.out.pri…