This action will force synchronization from 西瓜998/Java学习1, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
interface Elec{String brank(String p);default void price(int price){System.out.println( "电子产品的价钱为: ");}}class DianZi implements Elec{public String brank(String p){return p;}public void price(int price){System.out.println("平板的价钱为: "+price);}}class comp implements Elec{public String brank(String p){return p;}public void price(int price){System.out.println("手机的价钱为: " +price);}}public class d9 {public static void main(String[] args){Elec pr=null;pr=new DianZi();System.out.println(pr.brank("华为"));pr.price(4000);pr=new comp);System.out.println(pr.brank("荣耀"));pr.price(3500);}}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。