Consider the following java code
int a=1;
if (a != 0)
{
int a=3;
}
System.out.print(a);
What is the output
A. 0
B. 1
C. 3
D. No output. A compilation error occurs
The answer is B. I want to ask why the output shown will not be 3. As the 1 is not equal to 0, should the ' int a '...
hey guys I am learning greenfoot programming in college. I found out one multiple choice question that make me quite confused.
Which of the following is a valid data type?
A. integer
B. floating
C. boolean
D. number
Why is the answer option C?
I think that integer, floating and boolean...
I would like to raise a question about GDP deflator. In my macroeconomics textbook, there is a statement like this: "GDP deflator gives the average price of output". I wonder why the deflator will give the average price as it only measure the ratio between nominal GDP and real GDP...
Thanks for...
Hiya! I am a beginner in programming and I am now having a java course in college... In the first few lessons, we are taught that programming involves declaration of variables and variables are classified into several categories (e.g. int, float, boolean, double, etc.). I wonder why we have to...