java面向对象考题和答案.docVIP

  • 48
  • 0
  • 约9.31千字
  • 约 14页
  • 2017-02-27 发布于湖北
  • 举报
下面代码的输出结果是: public class Main { public static void main(String[] args) { int n = 100; int m = 200; System.out.println(f(n,m)); System.out.println(n); } public static int f(int m, int n) { n = m+n; return n; } } A.300 300 B.100 100 C.300 100 D.100 300 程序执行的结果是: public class Test { public static void main(String[] args) { int x = 6; Test p = new Test(); p.doStuff(x); System.out.println( main: x = + x); } void doStuff(int x) { System.out.println( doStuff:x = + x++); } } doStuff:x =7 main: x = 7 B.

文档评论(0)

1亿VIP精品文档

相关文档