Answer:
0.
Explanation:
Given
int x;
x=3/(int)(4.5+6.4)
Required
What is x?
The first line of the code segment declares x as integer. This means that, it will only hold non decimal numbers.
With the above explanation, options (a), (c) and (d) can not be true.
Solving further:
x=3/(int)(4.5+6.4)
The computer evaluates the denominator as:
x=3/(int)(10.9)
The denominator is then converted to an integer. So, we have:
x = 3/10;
3/10 = 0.3 but
Recall that: <em>x will only hold non decimal numbers.</em>
So:
x = 0;
Answer:
Check the explanation
Explanation:
public static void main(String[] args){
int[][] twoDimenArray = new int[2][];
//first row has 3 columns
twoDimenArray[0] = new int[3];
//second row has 4 columns
twoDimenArray[1] = new int[4];
int counter = 0;
//initializing array
for(int row=0; row < twoDimenArray.length; row++){
for(int col=0; col < twoDimenArray[row].length; col++){
twoDimenArray[row][col] = counter++;
}
}
//printing array
for(int row=0; row < twoDimenArray.length; row++){
System.out.println();
for(int col=0; col < twoDimenArray[row].length; col++){
System.out.print(twoDimenArray[row][col] + " ");
}
}
}
}
<u>Output
</u>
0 1 2
3 4 5 6
Answer:
i think it most be idea like me i am building an app i have an idea on how the graphics would be
Answer:
Explanation:
I mean I would copy and paste it. I hope thats right