请问下面代码发生了什么错误?
import java.awt.*;
import java.applet.*;
import java.io.*;
public interface Product{ //声明接口
static final String MAKER = "My Corp";
static final String PHONE = "555-123-4567";
public int getPrice(int id);
}
public class Shoe implements Product{//实现PRODUCT接口
public int getPrice(int id) { //重载getPrice方法
if (id == 1)
return (5);
else
return(10);
}
public String getMaker(){
return(MAKER);
}
}
public class Store{
static Shoe hightop;
public static void init(){
hightop = new Shoe();
}
public static void main(String argv[]){
init();
getInfo(hightop);
orderInfo(hightop);
}
public static void getInfo(Shoe item){
System.out.println("this Product is made by "+item.MAKER);
System.out.println("it costs $" + item.getPrice(1) + '\n');
}
public static void orderInfo( Product item){
System.out.println("To order from " + item.MAKER + " call " + item.PHONE + ".");
System.out.println("Each item costs $" + item.getPrice(1));
}
}
相关推荐
ANGULAR_UI_DEVELOPMENT_WITH_PRIMENG.pdf
Build rich and compelling Angular web applications using PrimeNG
Angular UI Development with PrimeNG
Angular is a sophisticated technology that aims to create a framework with multi-platform support, including web, mobile and desktop. When I heard the news about Angular 1 being rewritten for Angular 2, I got excited instantly, since it was an opportunity for us to develop a UI component suite that I was pretty sure would be a success similar to its predecessor.
Angular UI Development with PrimeNG 无水印原版pdf
Angular UI Development with PrimeNG 英文无水印原版pdf pdf所有页面使用FoxitReader、PDF-XChangeViewer、SumatraPDF和Firefox测试都可以打开 本资源转载自网络,如有侵权,请联系上传者或csdn删除 查看此书详细信息请在美国亚马逊官网搜索此书
angular-development-with-primeng, 书"Angular UI Development with PrimeNG" 中的代码示例.zip
angular-development-with-primeng, 书"Angular UI Development with PrimeNG" 中的代码示例 带PrimeNG的 Angular UI开发由 Oleg Varaksin 和 Sudheer Jonna编写。 由梦幻小组供电- Angular and PrimeNG 。
Angular-UI-Development-with-PrimeNG:Packt发行的使用PrimeNG进行Angular UI开发
PrimeNG开发Angular UI 这是发布的进行的代码存储库。 它包含从头到尾完成本书所必需的所有支持项目文件。 关于这本书 PrimeNG是用于Angular应用程序的领先的UI组件库,具有80多种丰富的UI组件。 PrimeNG在Angular世界中取得了巨大的成功,而且很快。 它是一个快速发展的库,与最新的Angular版本保持一致。 与竞争对手相比,PrimeNG在创建时就考虑了企业应用程序。 本书提供了一个先机,可以帮助读者使用流行的开发堆栈来开发真实的单页应用程序。 该书还侧重于如何避免一些常见的陷阱,并通过有效的Angular和PrimeNG开发技巧和技巧展示了最佳实践。 在本书的最后,读者将了解如何在Angular应用程序中使用PrimeNG的来龙去脉,并准备使用丰富的PrimeNG组件创建实际的Angular应用程序。 说明和导航 所有代码都组织在文件夹中。 每


Java SE
