Since Java is yet another type of programming language, you may wonder why it deserves so much attention, why do so many people think it is a milestone in computer programming? If you come from a traditional programming background, then the answer is not obvious at first. In addition to solving traditional programming problems, Java solves programming problems on the World Wide Web.
1 Packagecom.tomtest;2 3 4 classFather {5 Private intMoney ;6 floatWeight,height;7 String head;8 voidspeak (String s) {9 System.out.println (s);Ten } One } A classSonextendsFather { - String hand,foot; - } the Public classtomtest_24 { - Public Static voidMain (String args[]) { - Son Boy; -boy=NewSon (); +boy.weight=1.80f; -boy.height=120f; +Boy.head= "one Head"; ABoy.hand= "Two Hands"; atboy.foot= "Two Feet"; -Boy.speak ("I am a son"); -System.out.println (boy.hand+boy.foot+boy.head+boy.weight+boy.height); - } -}
Java and the Internet