Answer:
Information And Communication Technology
Answer:
The program to this question can be given as follows:
Program:
public class data //defining class data
{
//main method
public static void main (String [] as) //declaring main method
{
int userNum = 4; //declare variable userNum and assign value
for (userNum = 1; userNum <= 4; userNum++) //loop for print values
{
System.out.println(userNum); //print values in new lines.
}
}
}
Output:
1
2
3
4
Explanation:
In the above java program code firstly a class "data" is defined, inside this class the main method is defined in which an integer variable userNum is defined that holds a value that is "4".
- In this method, a for loop is declare that uses variable userNum which starts from 1 and ends with a given value that is equal to 4.
- Inside a for loop, the print function is used that print userNum variable each values in the newline.
Answer:
the type of reference
Explanation:
There are many cell reference types eg relative,absolute and mixed cell referencing. if you write your cell reference in relative type then it will change as you copy it to another cell. if you select absolute cell referencing then it will not change if you copy to another cell.
Answer:
<h2>Option B: #VALUE</h2>
is the correct answer.
Explanation:
<h3>Reasons of #VALUE error:</h3>
- When cells are not given the expected type of value.
- If cells are left blank unnoticeable or for giving a null value.
- For entering dates and other numerical data in text form.
<h3>Correcting and fixing #VALUE error:</h3>
This type of error can only be fixed by finding the cell in which there is wrong data entered and correct it.
Fixing the #VALUE error is tricky as some functions automatically ignore the data that is invalid.
<h3>EXAMPLE:</h3>
- Suppose a cell contains the value as cost of the object and in order to make it 0, NA is inserted into the cell.
- While making total of all the costs, that particular cell might cause #VALUE error.
- Following image attach will help you clear the concept.
I hope it will help you!
Answer:
PrintWriter variable = new PrintWriter("output.txt");
Explanation:
There are two ways of declaring a reference variable in programming.
One way is
Reference Variable-name = new Reference ("some texts here");
While the other is
Reference Variable-name;
Variable-name = new Reference ("some texts here");
Both ways are valid ways of reference variable declaration.
In the question above, the reference is PrintWriter, it points to output.txt and the question says "write a single statement";
Hence, we make use of
PrintWriter variable = new PrintWriter("output.txt");
A reference variable is declared to be of a specific type and that type can never be changed.