1497.Which of the following can be operands of arithmetic operators?
Numeric
Boolean
Characters
Both Numeric & Characters
1498.Modulus operator, %, can be applied to which of these?
Integers
Floating – point numbers
Both Integers and floating – point numbers.
None of the mentioned
1499.With x = 0, which of the following are legal lines of Java code for changing the value of x to 1?
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;
1. x++;
2. x = x + 1;
3. x += 1;
4. x =+ 1;
1, 2 & 3
1 & 4
1, 2, 3 & 4
3 & 2
1501.Which of these statements are incorrect?
Assignment operators are more efficiently implemented by Java run-time system than their equivalent long forms.
Assignment operators run faster than their equivalent long forms.
Assignment operators can be used only with numeric and character data type.
None
1502.What should be expression1 evaluate to in using ternary operator as in this line?
expression1 ? expression2 : expression3
expression1 ? expression2 : expression3
Integer
Floating – point numbers
Boolean
None of the mentioned
1503.What is the value stored in x in following lines of code?
int x, y, z;
x = 0;
y = 1;
x = y = z = 8;
int x, y, z;
x = 0;
y = 1;
x = y = z = 8;
0
1
9
8
1504.What is the order of precedence (highest to lowest) of following operators?
1. &
2. ^
3. ?:
1. &
2. ^
3. ?:
1 -> 2 -> 3
2 -> 1 -> 3
3 -> 2 -> 1
2 -> 3 -> 1
1505.Which of these statements are incorrect?
Equal to operator has least precedence.
Brackets () have highest precedence.
Division operator, /, has higher precedence than multiplication operator.
Addition operator, +, and subtraction operator have equal precedence.
1510.The order of precedence from highest to lowest is :
&&, /, |,{}
%, <=, &&, =
<, !, ==, ++
+, -, [], !=
1511.The && and || operators
Combine two numeric values
Compare two boolean values
Combine two boolean values
Compare two boolean values
- Collection
- ArrayList
- LinkedList
- Vector
- HashSet
- Conditional Statements
- Classes and Objects
- Inheritance
- Packages
- Exception Handling
- Threads
- TreeSet
- LinkedHashSet
- HashMap
- TreeMap
- LinkedHashMap
- HashTable
- Iterator and ListIterator
- String
- Scanner
- Array Small Programs
- Introduction
- Variables
- DataTypes
- Operators
- Conditional Statements
- Loop
- Arrays
- Object Oriented Programming
- Classes and Objects
- Access Modifiers
- Methods
- Abstraction
- Constructor
- Packages
- StringBuffer
- Inheritance
- StringBuilder
- Encapsulation
- Java IO
- Polymorphism
- Interface
- Types Of Variables
- Static Keyword
- Final Keyword
- Super Keyword
- This Keyword
- Exception Handling