Highlights
Task:
Question 1
Study the incomplete code below and answer question 1 that follows
double enter1 = 30;
double enter2 = 40;
//----(i)----
Indicate which of the following statements for the missing code in (i) will NOT render and error message.
(1) byte total = enter1 + enter2;
(2) float total = enter1 + enter2;
(3) int total = enter1 + enter2;
(4) double total = enter1 + enter2;
(5) none of the above
Question 2
Study the code below and answer question 2 that follows
double myUnisa = 321.8;
int myLife = (int) myUnisa;
Indicate what is the value of myLife will be.
(1) Error message
(2) 321
(3) 322
(4) 3218
(5) None of the above
3
Question 3
Study the code below and indicate what the values of enter1 and enter2 will be:
int enter1 = 8;
++enter1;
int enter2 = enter1--;
(1) enter1: 8 enter2: 7
(2) enter1: 8 enter2: 8
(3) enter1: 8 enter2: 9
(4) enter1: 9 enter2: 8
(5) enter1: 9 enter2: 9
Question 4
Study the code below and indicate what the value of member will be:
int m = 5, n = 6, b = 0, a = 2;
int member = (m + n) * b / a;
(1) 0
(2) 0.0
(3) 5
(4) 5.0
(5) Division by zero error message
4
Question 5
Which of the following is an INVALID variable name in Java?
(1) String Key = “Java”;
Reason: A variable name cannot start with a capital letter.
(2) String key = “Java”;
Reason: “key” is a reserved keyword in Java.
(3) String 1key = “Java”;
Reason: A variable name cannot start with a number.
(4) String _key = “Java”;
Reason: A variable name cannot start with an underscore (_).
(5) String key$ = “Java”;
Reason: The dollar sign ($) can only be used at the start of the variable name, e.g $key.
Question 6
Which one of the following is NOT a general process associated with developing a mobile application?
(1) Compiling
(2) Inheriting
(3) Designing
(4) Coding
Question 7
Which one of the following is not a primitive data type in Java?
(1) bytes
(2) bool
(3) long
(4) String
5
Study the code below and answer question 8 to 9
int average = 0;
int total = 4;
for (int x = 0;x < total; x++)
average += x;
Question 8
What is the value stored in average after the execution of these lines of code?
(1) 6
(2) 8
(3) 10
(4) 16
Question 9
Which one of the following options is essentially the same as the give code?
(1) int average = 0;
int total = 4;
for (int x = 0; x >= total; x++)
average += x;
(2) int average = 0;
int total = 4;
int x = 0;
while (x <= total) {
average += x;
x = x + 1;
}
(3) int average = 0;
int total = 4;
do{
average += total
}
while (total > 0);
(4) int average = 0;
int total = 4;
do {
average += --total;
}
while (total != 0);
7
Question 10
Which one of the following lines of code is an INCORRECT array declaration?
int [] myArray1 = new int [7]; //line 1
int [] myArray2 = {10,20,30,40}; //line 2
int myArray3[]; myArray = new int [7]; //line 3
int myArray4[]; myArray4[] = new int [7];//line 4
(1) line 1
(2) line 2
(3) line 3
(4) line 4
Question 11
Study the code below and indicate what the value will be for theString after the code has executed:
char [ ] list = {‘a’, ‘b’, ‘c’, ‘d’, ‘e’};
String theString = new String (list);
(1) abcde
(2) ‘a’ ‘b’ ‘c’ ‘d’ ‘e’
(3) a b c d e
(4) Error message: error: incompatible types
Reason: you cannot create a new String from type char [
This ICT2612 IT Assignment has been solved by our IT experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics. Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.