1、abstract:用于声明抽象类,以及抽象方法。
12345678910111213abstract class Animal { abstract void makeSound(); public void sleep() { System.out.println("The animal is sleeping."); }}class Dog extends Animal { void makeSound() { System.out.println("The dog barks."); }}
**在这个示例中,我们创建了一个名为 Animal 的抽象类,其中包含一个抽象方法 **makeSound() 和一个具体方法 sleep()。
2、boolean:Java 中的一种基本数据类型,表示布尔值,即真(true)或假(false)。boolean 数据类型常用于判断条件、循环控制和逻辑运算等场景。
...
Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.
Quick StartCreate a new post1$ hexo new "My New Post"
More info: Writing
Run server1$ hexo server
More info: Server
Generate static files1$ hexo generate
More info: Generating
Deploy to remote sites1$ hexo deploy
More info: Deployment
