Answer:
Following are the program definition in the Java Programming Language.
//define a class
public class Clock
{
//set integer type variable and initialize value
private int hours=12;
//set boolean type variable and initialize value
private boolean isTicking=true;
//set integer type variable and initialize value
private Integer diff=5;
}
Explanation:
Following are the description of Code.
- Firstly define a class "Clock" with the "private" access modifier.
- Then, set the integer data type variable "hours" with the "private" access modifier and assign value 12 in that class.
- After that, set the boolean data type variable "isTicking" with the "private" access modifier and assign value "true".
- Finally set Integer class variable "diff" with the the private access modifier and assign value 5.
<span>In order to allow communication between vlans for exchange of data what must be used?
Router must be used</span>
Answer:
Command: Systemoutprintln (b)
Output: 7
Explanation:
To solve this problem, we must take into account the precedence of operation.
The division takes precedence before the addition, so we must divide before we add for b.
So
int b = 4 + 6/2 = 4 + 3 = 7.
So
Command: Systemoutprintln (b)
Output: 7