Sapient Company Programming

Which of the following funcations would return layout of a fragment, assuming that funcation is implemented in the fragment class?

1) onCreate()
2) onFragmentView()
3) onView()
4) onCreateView()

Read Solution (Total 1)

Sapient Other Question

What should be the access specifiers for function Bob() in the following code snippet so that the program doesn't get compiler error?

class Base{
---1--- void Bob(){}
}

class Derived extends Base{
---2--- void Bob(){}
}

public class Main{
public static void main(String args[]){
Derived d = new Derived();
}
}

1) 1=public 2=protected
2) 1=public 2=private
3) 1=private 2=public
4) 1=private 2=protected
To create a fragment, which of the following options holds true?

1) Extend android.app.Fragment class
and create using code snippet below
public class Fragment_Name extends Fragment{
.....

2) Extend android.app.FragmentClass class
and create using code snippet below:
public class Fragment_Name extends Fragment{
....

3) Extend android.app.Fragment class
and create using code snippet below:
public class Fragment_Name extends FragmentClass{
....

4) None of the given options