单选题class Flibitz { public static void main(String [] args) { int grop = 7; new Flibitz().go(grop); System.out.print(grop); } void go(int grop) { if(++grop 〉 7) grop++; System.out.print(grop); } } 结果为:()A77B79C97D99
单选题
class Flibitz { public static void main(String [] args) { int grop = 7; new Flibitz().go(grop); System.out.print(grop); } void go(int grop) { if(++grop 〉 7) grop++; System.out.print(grop); } } 结果为:()
A
77
B
79
C
97
D
99
参考解析
解析:
暂无解析
相关考题:
classFlibitz{publicstaticvoidmain(String[]args){intgrop=7;newFlibitz().go(grop);System.out.print(grop);}voidgo(intgrop){if(++grop7)grop++;System.out.print(grop);}}结果为:() A.99B.编译失败C.运行时异常被抛出D.77E.79F.97
classFlibitz{publicstaticvoidmain(String[]args){intgrop=7;newFlibitz().go(grop);System.out.print(grop);}voidgo(intgrop){if(++grop〉7)grop++;System.out.print(grop);}}结果为:() A.77B.79C.97D.99
下面程序段的输出结果为( )。 package test; public class ClassA { int x=20: static int y=6; public static void main(String args[]) { ClassB b=new ClassB; go(10); System.out.println("x="+b.x); } } class ClassB { int X; void go(int y) { ClassA a=new ClassA; x=a.Y ; } }A.x=10B.x=20C.x=6D.编译不通过
下面程序段的输出结果为 package test; public class A { int x=20; static int y=6; public static void main(String args[]) { Class B b=new Class B(); b.go(10); System.out.println(”x=”+b.x); } } class Class B { int x; void go(int y) { ClassA a=new ClassA(); x=a.y; } }A.x=10B.x=20C.x=6D.编译不通过
以下程序的运行结果为?class ValHold{public int i = 10;}public class ObParm{public static void main(String argv[]){ObParm o = new ObParm();o.amethod();}public void amethod(){int i = 99;ValHold v = new ValHold();v.i=30;another(v,i);System.out.print( v.i );}public void another(ValHold v, int i){i=0;v.i = 20;ValHold vh = new ValHold();v = vh;System.out.print(v.i);System.out.print(i);}}A.10030B. 20030C. 209930D. 10020
现有: class Passer f static final int X=5; public static void main (String [] args) { new Passer().go (x); System. out .print (x); } void go (int x) { System. out .print(x++); } 结果是什么?() A、55B、56C、65D、66
class Flibitz{ public static void main(String[] args){ int grop=7; new Flibitz().go(grop); System.out.print(grop); } void go(int grop){ if(++grop7) grop++; System.out.print(grop); } } 结果为:() A、99B、编译失败C、运行时异常被抛出D、77E、79F、97
class BitStuff { BitStuff go() { System.out.print("bits "); return this; } } class MoreBits extends BitStuff { MoreBits go() { System.out.print("more "); return this; } public static void main(String [] args) { BitStuff [] bs = {new BitStuff(), new MoreBits()}; for( BitStuff b : bs) b.go(); } } 结果为:() A、bits bitsB、bits moreC、more moreD、编译失败
class Flibitz { public static void main(String [] args) { int grop = 7; new Flibitz().go(grop); System.out.print(grop); } void go(int grop) { if(++grop 〉 7) grop++; System.out.print(grop); } } 结果为:() A、77B、79C、97D、99
class Output { public static void main(String [] args) { int i = 4; System.out.print("3" + i + " "); System.out.print(i + 4 + "6"); System.out.println(i + "7"); } } 结果为() A、7 8611B、7 44647C、34 8611D、34 8647
class Passer { static final int x = 5; public static void main(String [] args) { new Passer().go(x); System.out.print(x); } void go(int x) { System.out.print(++x); } } 结果是什么?() A、55B、56C、65D、66
public class Yikes { public static void go(Long n) {System.out.println(”Long “);} public static void go(Short n) {System.out.println(”Short “);} public static void go(int n) {System.out.println(”int “);} public static void main(String [] args) { short y= 6; long z= 7; go(y); go(z); } } What is the result?() A、 int LongB、 Short LongC、 Compilation fails.D、 An exception is thrown at runtime.
class Wrench2 { int size; public static void main(String [] args) { Wrench2 w = new Wrench2(); w.size = 9; Wrench2 w2 = go(w, w.size); System.out.print(w2.size); } static Wrench2 go(Wrench2 wr, int s) { s = 7; return wr; } } 结果为:() A、7B、9C、编译失败D、输出结果不可预料
public class Wow { public static void go(short n) {System.out.println(”short”); } public static void go(Short n) {System.out.println(”SHORT”);} public static void go(Long n) {System.out.println(” LONG”); } public static void main(String [] args) { Short y= 6; int z=7; go(y); go(z); } } What is the result?() A、 short LONGB、 SHORT LONGC、 Compilation fails.D、 An exception is thrown at runtime.
现有: class Banana2 f static int X=2; public static void main (String [] args) { int X=2; Banana2 b=new Banana2(); b.go(x); } static {x+=x; } void go (int x) { ++x; System. out.println (x); } 结果为:() A、7B、5C、3D、2
单选题现有 class Beverage { Beverage () { System.out.print ("beverage "); } } class Beer extends Beverage { public static void main{string [] args) { Beer b = new Beer (14) ; } public int Beer(int x) { this () ; System.out.print ("beerl") ; } public Beer() { System.out.print("beer2 "); } } 结果是什么?()Abeerl beverageBbeer2 beverageCbeverage beer2 beerlD编译失败
单选题现有: class Banana2 f static int X=2; public static void main (String [] args) { int X=2; Banana2 b=new Banana2(); b.go(x); } static {x+=x; } void go (int x) { ++x; System. out.println (x); } 结果为:()A7B5C3D2
单选题class Wrench2 { int size; public static void main(String [] args) { Wrench2 w = new Wrench2(); w.size = 9; Wrench2 w2 = go(w, w.size); System.out.print(w2.size); } static Wrench2 go(Wrench2 wr, int s) { s = 7; return wr; } } 结果为:()A7B9C编译失败D输出结果不可预料
单选题现有: class Cat { Cat(int c) { System.out.print("cat" + c + " "); } } class SubCat extends Cat { SubCat(int c) { super(5); System.out.print("cable "); } SubCat() { this(4); } public static void main(String [] args) { SubCat s = new SubCat(); } } 结果为:()Acat5BcableCcable cat5Dcat5 cable
单选题现有: class Passer f static final int X=5; public static void main (String [] args) { new Passer().go (x); System. out .print (x); } void go (int x) { System. out .print(x++); } 结果是什么?()A55B56C65D66
单选题class Bird { static void talk() { System.out.print("chirp "); } } class Parrot extends Bird { static void talk() { System.out.print("hello "); } public static void main(String [] args) { Bird [] birds = {new Bird(), new Parrot()}; for( Bird b : birds) b.talk(); } } 结果为:()Achirp chirpBchirp helloChello helloD编译失败
单选题public class Yikes { public static void go(Long n) {System.out.println(”Long “);} public static void go(Short n) {System.out.println(”Short “);} public static void go(int n) {System.out.println(”int “);} public static void main(String [] args) { short y= 6; long z= 7; go(y); go(z); } } What is the result?()A int LongB Short LongC Compilation fails.D An exception is thrown at runtime.
单选题class Passer { static final int x = 5; public static void main(String [] args) { new Passer().go(x); System.out.print(x); } void go(int x) { System.out.print(++x); } } 结果是什么?()A55B56C65D66
单选题class Output { public static void main(String [] args) { int i = 4; System.out.print("3" + i + " "); System.out.print(i + 4 + "6"); System.out.println(i + "7"); } } 结果为()A7 8611B7 44647C34 8611D34 8647
单选题class BitStuff { BitStuff go() { System.out.print("bits "); return this; } } class MoreBits extends BitStuff { MoreBits go() { System.out.print("more "); return this; } public static void main(String [] args) { BitStuff [] bs = {new BitStuff(), new MoreBits()}; for( BitStuff b : bs) b.go(); } } 结果为:()Abits bitsBbits moreCmore moreD编译失败
单选题class Flibitz{ public static void main(String[] args){ int grop=7; new Flibitz().go(grop); System.out.print(grop); } void go(int grop){ if(++grop7) grop++; System.out.print(grop); } } 结果为:()A99B编译失败C运行时异常被抛出D77E79F97
单选题public class Wow { public static void go(short n) {System.out.println(”short”); } public static void go(Short n) {System.out.println(”SHORT”);} public static void go(Long n) {System.out.println(” LONG”); } public static void main(String [] args) { Short y= 6; int z=7; go(y); go(z); } } What is the result?()A short LONGB SHORT LONGC Compilation fails.D An exception is thrown at runtime.