JAVA程序实例 JAVA编程实例1、publicclassMyClass{privateintval1,val2;publicvoidmyFun(intx,inty){val1=x;val2=y;System.out.println("Thesumis:"+(val1+val2));}publicstaticvoi