Advertisements
Advertisements
Question
If the value of basic=1500, what will be the value of tax after the following statement is executed?
tax = basic > 1200 ? 200 : 100
Solution
200
APPEARS IN
RELATED QUESTIONS
Write the return data type of the following function: startsWith( )
Write the return data type of the following function: random( )
What is the value of xl if x=5?
x1 = + +x – X+ + + –x
What is the type of casting shown by the following example:
char c = (char) 120;
Evaluate the value of n. if value of p = 5, q = 19
int n = (q – p) > (p – q) ? (q – p) : (p – q)
Arrange the following primitive-data types in ascending order of their size:
(i) char (ii) byte (iii) double (iv) int
What is the value of y after evaluating the expression given below?
y+= ++y + y-- + --y; when int y=8;
What are the values of a and b after the following function is executed if the values passed are 30 and 50?
void paws(int a, int b)
{ a = a + b;
b = a - b;
a = a - b;'
System.out.println(a + "," + b);
}
State the data type and value of y after the following is executed: char x = 7; y = Character.isLetter(x);
State the value of y after the following is executed:
char x = '7';
y = Character.isLetter(x);