About java content and feelings of self-study

This week the self-knowledge of java class, schedule a bit slow, you need to pay close attention to the rest of the knowledge learned, after the holiday due to poor self-control not to play all kinds of really serious learning, progress next week after serious study, for complete all school play!

/ **
* Animal class
*
* /
public class Animal {
String name; // name of animal
int eye; // number of eye
int legs; // How many legs

/ **
* Output eat animal foods
* @ param food food
* /
public void EAT (String food, I int, char S) {// String parameter called food this method, there may be a plurality of parameters of the method, the parameter used between the partition
System.out.println ( " such animal foods are: "food +);
}

/ **
* animal moves
* @param moveType movably
* /
public void move (String MoveType) {
int I = 0;
System.out.println (" this moves animal species are: "+ MoveType);
}
}

This is done by watching the video and he struck code, draw the essence, to master the application class.

Guess you like

Origin www.cnblogs.com/yangxionghao/p/11371523.html