在某类的公共部分有声明string operator++( );和string operator++(int);则说明A.string operator++( );是前置自增运算符声明B.string( )perator++( );是后置自增运算符声明C.string operator++(int);是前置自增运算符声明D.两条语句无区别
在某类的公共部分有声明string operator++( );和string operator++(int);则说明
A.string operator++( );是前置自增运算符声明
B.string( )perator++( );是后置自增运算符声明
C.string operator++(int);是前置自增运算符声明
D.两条语句无区别
相关考题:
下列程序段运行的结果为 public class Test{ static void print(String s,int i){ System.out.println("String:"+s+",int:"+i); } static void print(int i,String s){ System.out.println("int:"+i+",String:"+s); } public static void main(String[]args){ print(99,"Int first"); } }A.String:String first,int:11B.int:11,String:Int firstC.String:String first,int99D.int:99,String:Int first
如果表达式++x/y中,++是作为友元函数重载的,/是作为成员函数重载的,则该表达式还可为A.(operator++(x)).operator/(y)B.(operator++(0)).operator/(y)C.operator/((operator++(x,0)),y)D.operator/((operator++(0)),y)
如果表达式++x/y中,+ +是作为友元函数重载的,/是作为成员函数重载的,则该表达式还可为( )。A.(operator + +(x)).operator/(y)B.(operator + +(0)).operatr/(y)C.operator/((operator + + (x,0)),y)D.operator/((operator + + (0)),y)
下列程序段运行的结果为 public class Test{ static void print(String s,int i){ System.out.println("String:"+s+",int:"+i); } static void print(int i, String s){ System.out.println("int:"+i+",String:"+s); } public static void main(String [] args){ print(99,"Int first"); } }A.String:Stringfirst,int:11B.int:11,String:Int firstC.String:String first,int:99D.int:99,String:int first
在某类的公共部分有声明string operator++();和string operator++(int);则说明A.string operator++();是前置自增运算符声明B.string operator++();是后置自增运算符声明C.string operator++(int); 是前置自增运算符声明D.两条语句无区别
3下列程序段运行的结果为( )。 public class Test{ static void print(String s,int i){ System.out.pdntlnC String: "+s+",int:"+i); } static void print(iht i,String s){ System.out.prinflnCint:"+i+",gtring:"+s); } public static void main(String[] args){ print(99,"Int first"); } }A.String:String first,int: 11B.int: 11,String:Int firstC.String:String first,int:99D. int:99,Stfing:Int first
下面数组的声明和创建()是正确的。A.String [][]a=new String[4][4];B.String [][]a=new String[][4];C.String [4][4]a=new String[][];D.String [][]a=new String[][];