NEW
Font size
WorksheetsSOCKET PROGAMMING BASICS 1
Total questions: 10
Worksheet time: 3mins
................................... is the name given to the memory location where a value is stored.
Variable
Class
Object
Constant
A _____________is a value that does not change throughout program execution.
Variable
Constant
Class
Object
_________________are the reserved words available in Java language.
Variables
Keywords
Constants
Classes
Keywords listed in Java can be used as identifiers.
True
False
In a Java program, variables should be declared before they can be used.
True
False
Specify whether the following variable name are valid/invalid
total sum
Valid
Invalid
The statements in which you expect exceptions in runtime should be enclosed within a ________block.
try
catch
throw
Choose the CORRECT scanner declaration.
Scanner input = new Scanner(System.in);
scanner input = new Scanner(System.in);
Scanner input = new scanner(System.in);
Scanner input = new Scanner(system.in);
Scanner input = new Scanner(System);
Choose the CORRECT statement to accept Integer input from user, for the following variable:
int age;
age=input.nextInt();
age=input.nextInteger();
age=input.nextInt()
input.nextInt();
input.nextInteger();
Choose the CORRECT object call for getting the current PCs IP address
InetAddress address = InetAddress.getLocalHost();
InetAddress address = InetAddress.getLocalHost();
InetAddress address == InetAddress.getLocalHost();
InetAddress address = InetAddress.getLocalHost():
