WorksheetsInternet and Mobile Programming Final Review
Total questions: 96
Worksheet time: 48mins
What is the full form of SDK?
SOFTWARE DEVICE KIT
SYSTEM DEVELOPMENT KIT
SOFTWARE DEVELOPMENT KIT
SOFTWARE DEVICE KIT
We require an AVD to create an emulator . What does AVD stands for?
ACTIVE VIRTUAL DISPLAY
ANDROID VIRTUAL DEVICE
ANDROID VIRTUAL DISPLAY
ACTIVE VIRTUAL DEVICE
In Android studio which layout is the default layout in XML
LINEAR LAYOUT
RELATIVE LAYOUT
CONSTRAIN LAYOUT
ABSOLUTE LAYOUT
Antroid Toast is used to display the information for a short period of time.
TRUE
FALSE
Which Android Studio file is most of the app coding done in?
MainActivity.java
Activity_main_xml
AndroidManifest.xml
Android is based on which kernel?
Linux
Mac
Windows
Symbian
Android is based on linux for the following reason:
Security
Networking
Portability
All of these
Which programming language is used for Android Application Development?
C#
PHP
Java & Kotlin
Phyton
In which directory XML layout files are stored?
/res/drawable
/src
/res/values
/res/layout
While Java or Kotlin source files stored in ....
/res/drawable
/src
/res/values
/res/layout
During an activity life cycle, what is the first callback method invoked by the system?
onStart()
onCreate()
onPause()
onStop()
TCP Client should known which information
Server port number
Client IP Address
Server IP Address
Server IP Address and Port Number
Which method is used to make main thread to wait for all child threads
Join ()
Sleep ()
Wait ()
Stop ()
Which will contain the body of the thread and task to do?
Start()
Run()
Main()
Execute()
The life cycle of a thread in java is controlled by
JRE
JDK
JVM
None
Thread priority in Java is?
Integer
Float
Double
Long
Q) What is maximum thread priority in Java
10
12
5
8
Q) Which method is used to check if a thread is running?
isAlive()
run ()
alive ()
keepAlive()
Q) Min and Max priority of a thread in Java multithreading are
1, 10
0,10
0,255
1,256
Thread is _____________process that can run independently
heavyweight
lightweight
compaction
compression
Choose THREE(3) benefits of multithreaded processing
scalability
resource sharing
privacy
responsiveness
In the JavaFX framework which notation do you use to connect Scene builder Controls to the Java class?
@FXML
@Override
@Connect
@JFXML
What is the correct syntax for creating a button in a JavaFX's project class.
Button btn = new Button();
button btn = new button();
Btn button = new Btn();
btn button = new btn();
Which method can you use to disable a button?
getDisable()
Disable()
setDisable()
Stop()
Which method do you use to style components (containers, controls, etc) in JavaFX's project class.
myStyle()
setStyle()
getStyle()
Style()
Is String a primitive data type?
Yes
No
What do we call an object that waits for a specific event to happen?
event
listener
container
component
What do we call the thing that happens whenever the user interacts with the components on the screen?
event
listener
container
component
You can have nested panes in JavaFX
True
False
To change rectangle color, we use….
rec.Fill(GREEN)
rec.Fill(Color.GREEN)
rec.setFill(GREEN)
rec.setFill(Color.GREEN)
To make animation reverse direction we set autoReverse to true
True
False
To handle user interaction through keyboard, we use...
setKeyPressed
setOnKeyPressed
setOnPressed
none of these
To check which key is pressed, we use...
getButton
getKey
getCode
none of these
Suppose A is an inner class in Test. A is compiled into a file named.....
A.class
Test$A.class
A$Test.class
Button btOK = new Button("OK");
btOK.setOnAction(e -> System.out.println("OK 1"));
btOK.setOnAction(e -> System.out.println("OK 2"));
When clicking the button, the program displays OK1 OK2.
When clicking the button, the program displays OK1.
When clicking the button, the program displays OK2.
The program has a compile error, because the setOnAction method is invoked twice
Initially, the JavaFX project was recognized as Form Follows Functions?
True
False
Which one of these is not part of the JavaFX graphics engine?
Prism
Glass
Media
Scene graph
JavaFX API is the bottommost layer of JavaFX architecture
True
False
The part oJavaFx API that is responsible for application styling is....?
javafx.animation
javafx.css
javafx.scene
javafx.geometry
All the GUI Applications in JavaFX are made using a Scene Graph only. A single component in a scene graph is known as a ____
item
element
node
object
Swing and JavaFX are replaced by the AWT platform for developing rich Internet applications?
True
False
In this statement, d1.bind(d2);
d1 is the target and d2 is the source
d2 is the target and d1 is the source
Both of them are targets and sources
None of these
In this statement, d1.bindBidirectional(d2);;
d1 is the target and d2 is the source
d2 is the target and d1 is the source
Both of them are targets and sources
None of these
To assign a button "btOK" to a Pane "pane", we write___
pane.add(btOK);
pane.getChildren().add(btOK);
pane.setChildren().add(btOK);
None of these
To change the pane border color to red, we pass _____ parameter to setStyle
-fx-border: red
-fxborder-color: red
-fx-background-color: red
-fx-border-color: red
Which listener is called for the device to register the enter key press?
OnHoverListener
OnKeyListener
OnClickListener
OnContextClickListener
Which folder do you copy and paste an image into?
Resources
Java
Drawable
Layout
Which is correct for using any image with the name "trainstation"?
Android:src="trainstation"
Src=@drawable/trainstation
Android:src="@drawable/trainstation"
Android:"@drawable/trainstation"
Which one is not a nickname of an Android version?
Cupcake
Pie
Nougat
Menthos
What does "HAL" stand for?
Hello, Android Lovers
Hardware Abstraction Layer
It's a reference to the HAL 9000 computer
Hardware Advancement Level
What Activity method you use to retrieve a reference to an Android view by using the id attribute of a resource XML?
findViewByReference(int id)
retrieveResourceById(int id)
findViewById(int id)
findViewById(String id)
What is the parent class of all Activity widgets?
Layout
ViewGroup
View
Widget
What does the Android project folder “res/” contain?
Resource files
Java Activity classes
Java source code
Libraries
Gradle is the build system used in Android Studio. It builds, tests, runs, and packages your apps
True
False
most of UI is defined in............ files
PHP
CSS
XML
CCS
A layout that defines the position for each view based on constraints to sibling views and the parent layout
TextView
Activity_main
Pick a Resource
ConstraintLayout
what keyword represents actions that usually involve opening another activity?
onClickListener
intent
MainActivity
androidManifest
Which language is specifically used for the User Interface (UI) portion of Android app development?
xml
java
c#
kotlin
Which type of layout can use either horizontal or vertical orientations?
relative layout
linear layout
8. What is Manifext.xml in Android?
It has information about layout in an application
It has all the information about an application
It has the information about activities in an application
None of the above
10. What does API stands for?
Application programming interface
Algorithmic Protocol Interface
Accellerated Programming Interface
None of above
what is a Density-Independent Pixel?
a flexible number of unit of pixels that change with the screen size
a fixed number of pixels regardless of the screen size
Which one is not a nickname of an Android version?
Cupcake
Pie
Nougat
Menthos
What is Log message in android?
Log message is used to debug a program
Same as printf()
Same as Toast()
None of the above
What attribute will use to increase the size of the text?
app:textSize
android:textSize
tools:textSize
None of the above
Android is
Web server
Operating system
Web browser
None of these
Which view we need to use if we want take input from user?
TextView
EditText
InputText
Button
Q) Number of threads in below java program is
public class ThreadExtended extends Thread {
public void run() {
System.out.println("\nThread is running now\n");
}
public static void main(String[] args) {
ThreadExtended threadE = new ThreadExtended();
threadE.start();
}
}
0
1
2
3
Q) Execution of a java thread begins on which method call?
Start ()
Run ()
Execute ()
Launch ()
What is the priority of the thread in the following Java Program?
class multithreaded_programing {
public static void main(String args[])
{
Thread t = Thread.currentThread(); System.out.println(t);
}
}
4
5
0
1
I am a........
BorderPane
FlowPane
VBox
HBox
The individual elements in a JavaFx scene are called nodes
True
False
Identify the control pointed at.
Image
Button
Label
TextBox
What is the unique address assigned to each device
DNS address
IP address
FTP address
Home address
What is the correct order of the 3 phases in Server sockets?
Connection, Data Transfer, Close the connection
Data transfer, connection, close the connection
Connection, close the connection, data transfer
Close the connection, data transfer, connection
Which among the two must be write the code first to run
Client
Server
Function to accept the request of client to join the server
server.connected()
server.add()
server.accept()
server.join()
........................is known as passive socket
Client Socket
Server Socket
Port Socket
none of the above
Which socket function is responsible for freeing up the ports used by the socket?
socket open
socket send
socket bind
socket close
