• 2021-04-14
    以下是"public static void test(int x, int y)"的方法重载
  • public static void test(int x, int y,int z)

    内容

    • 0

      (1+X)以下哪个不是 “public static void aMethod(){...}” 的重载方法( )? A: public static void aMethod(int num ) ; B: public static int aMethod() ; C: public static void aMethod(int num ,String name) ; D: public static void aMethod(String name) ;

    • 1

      分析以下C#代码,其运行结果是______ using System;class Test{ public static void Main() { int x = 5; int y = x++; y=++x; Console.Write (y); }}

    • 2

      给定Java代码如下所示,在横线处新增下列( )方法,是对cal方法的重载。public class Test{  public void cal(int x, int y, int z) {   }                                                            }

    • 3

      不能与该方法构成重载的方法是() public double fun(int x,double y){ return x + y; } A: public void fun(int x){ System.out.println("x * x="+(x*x)); } B: public void fun(int a, double b){ System.out.println("a +b ="+(a+b)); } C: public int fun(int x, int y,int z){ renturn (x+y+z); } D: public double fun(double x, int y){ return x * y ; }

    • 4

      1. 写出以下程序的运行结果。 class Test { public static void Main() { int x = 5; int y = x++; Console.WriteLine(y); y=++x; Console.WriteLine(y); Console.WriteLine(x); } } 运行结果: