/*写一个动物
*
*
*/
package com.test1;
public class Test {
class Animal
{
int age;
String name;
String color;
//吃东西
public void eat(int age,String name)
{
System.out.println(name+"吃的食物是"+Food.name);
}
}
static class Food
{
static String name;
public void setName(String name)
{
this.name=name;
}
}
public static void main(String[] args) {
// TODO Auto-generated method stub
}
}