import java.util.Scanner;
public class HelloWorld{
public static void main(String []args){
lowb lowb=new lowb();
lowb.barking();
lowb.hungry();
lowb.sleeping();
lowb.typeCode();
}
}
interface itIsDog {
public void barking();
public void hungry();
public void sleeping();
public void typeCode();
}
class lowb implements itIsDog{
public void barking() {
// it not allow barking
System.out.println("Warning: IT Dog not allow to bark");
}
public void hungry() {
// it eat shit all the time
System.out.println("What do you want to eat?");
Scanner scanner = new Scanner(System.in);
String food = scanner.nextLine();
if (!food.equals("Shit"))
System.out.println("Warning: IT Dog can only eat shit");
else
System.out.println("There you are!Lets eat "+food);
}
public void sleeping() {
// company is our home
System.out.println("Sleep!But in Company!!");
}
public void typeCode(){
// TBC
System.out.println("Dont stop coding unless you died!");
}
}
原來而家IT狗可以學術討論了
![](https://cdn.lihkg.com/assets/faces/dog/itdog1.gif)