关于Fragment 说法正确的是()。A.每次启动Fragment 都会执行他的onGreate() 方法。B.Fragment 有自己的界面和生命周期,可以完全替代ActivityC.Fragment 的状态跟随它所关联的Activity 的状态改变而改变D.当Fragment 停止时,与它关联的Activity 也会停止
关于Fragment 说法正确的是()。
A.每次启动Fragment 都会执行他的onGreate() 方法。
B.Fragment 有自己的界面和生命周期,可以完全替代Activity
C.Fragment 的状态跟随它所关联的Activity 的状态改变而改变
D.当Fragment 停止时,与它关联的Activity 也会停止
参考答案和解析
fragment 本身没有在屏幕上显示视图的能力。
相关考题:
下面关于Fragment的描述,正确的是()。 A.使用Fragment,能使程序更加合理和充分地利用屏幕的空间B.Android4.0版本开始提供Fragment类C.Fragment可以代替Activity使用D.Fragment不能嵌入到Activity中
要创建一个Fragment,必须创建一个Fragment的子类,或者继承自另一个已经存在的Fragment的子类。例如,要创建一个名称为NewsFragment,并重写()方法 A.onCreateView()B.onCreate()C.onDraw()D.online()
关于GetPodAction定义,下面赋值正确的是()type Fragment interface {Exec(transInfo *TransInfo) error}type GetPodAction struct {}func (g GetPodAction) Exec(transInfo *TransInfo) error {...return nil} A. var fragment Fragment = new(GetPodAction)B. var fragment Fragment = GetPodActionC. var fragment Fragment = &GetPodAction{}D. var fragment Fragment = GetPodAction{}
在LAN Switch中()转发方式,在每一个帧都进行了CRC校验。A、Cut-throughB、Store and forwardC、Fragment CheckD、Fragment Free
How does an IPv6 router deal with a packet that is larger than the outgoing interface MTU?()A、It will fragment the packet at Layer 2.B、It will fragment the packet at Layer 3.C、It will drop the packet and send an ICMPv6 message "packet too big" back to the source.D、It will drop the packet.
Which two are valid fields in an IPv6 header?()A、Hop LimitB、Next HeaderC、Fragment OffsetD、Header Checksum
Which code fragments will succeed in printing the last argument given on the command line to the standard output, and exit gracefully with no output if no arguments are given?() CODE FRAGMENT a: public static void main(String args[]) { if (args.length != 0) System.out.println(args[args.length-1]); } CODE FRAGMENT b: public static void main(String args[]) { try { System.out.println(args[args.length]); } catch (ArrayIndexOutOfBoundsException e) {} } CODE FRAGMENT c: public static void main(String args[]) { int ix = args.length; String last = args[ix]; if (ix != 0) System.out.println(last); } CODE FRAGMENT d: public static void main(String args[]) { int ix = args.length-1; if (ix 0) System.out.println(args[ix]); } CODE FRAGMENT e: public static void main(String args[]) { try { System.out.println(args[args.length-1]); }catch (NullPointerException e) {} } A、Code fragment a.B、Code fragment b.C、Code fragment c.D、Code fragment d.E、Code fragment e.
单选题Which code fragments will succeed in printing the last argument given on the command line to the standard output, and exit gracefully with no output if no arguments are given?() CODE FRAGMENT a: public static void main(String args[]) { if (args.length != 0) System.out.println(args[args.length-1]); } CODE FRAGMENT b: public static void main(String args[]) { try { System.out.println(args[args.length]); } catch (ArrayIndexOutOfBoundsException e) {} } CODE FRAGMENT c: public static void main(String args[]) { int ix = args.length; String last = args[ix]; if (ix != 0) System.out.println(last); } CODE FRAGMENT d: public static void main(String args[]) { int ix = args.length-1; if (ix 0) System.out.println(args[ix]); } CODE FRAGMENT e: public static void main(String args[]) { try { System.out.println(args[args.length-1]); }catch (NullPointerException e) {} }ACode fragment a.BCode fragment b.CCode fragment c.DCode fragment d.ECode fragment e.
单选题How does an IPv6 router deal with a packet that is larger than the outgoing interface MTU?()AIt will fragment the packet at Layer 2.BIt will fragment the packet at Layer 3.CIt will drop the packet and send an ICMPv6 message packet too big back to the source.DIt will drop the packet.
多选题Which code fragments will succeed in initializing a two-dimensional array named tab with a size that will cause the expression tab[3][2] to access a valid element?() CODE FRAGMENT a: int[][] tab = { { 0, 0, 0 }, { 0, 0, 0 } }; CODE FRAGMENT b: int tab[][] = new int[4][]; for (int i=0; i CODE FRAGMENT c: int tab[][] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; CODE FRAGMENT d: int tab[3][2]; CODE FRAGMENT e: int[] tab[] = { {0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0} };ACode fragment a.BCode fragment b.CCode fragment c.DCode fragment d.ECode fragment e.
名词解释题Klenow 片段(Klenow fragment)