OCJP(Oracle Certified Java Program)

Totel:39 Click: 1 2 3 4 5 6 7 8
scjp1.5 Interview Questions And Answers

Page 1

Logical operator basically 6 are there which is following here : 
  1. &
  2. |
  3. ^
  4. !
  5. &&
  6. ||
These are operators are logical operators.Its work with two expression that must resolve the boolean value.The && and & opretor retuns true only if both operands are true.the || and | opratiors are return true if either or both operands are true,

Conditional operator is basically called the Ternary operator its mainly return the two values based on the whether a boolean expression is true or false.its have a two conditions which is following here :

  1. returns the value after the ? if the expression is true.
  2. returns the value after the : if the expression is false.

Increment operator or decrement operator basically suing the two operators this is called : 
  1. Prefix (-- or ++)
  2. Post fix(-- or ++)

The post fix use run before the value used in the expression .and prefix uses run after the value is used in the expression.In any expresseion both operands are fully evaluated before the oprator is applied.varaile marked final cannot be incremented or decremented.

String Concatenation Operator is basically a operand is the string this is the + operator concatenates the operands.its both of the operands are numeric and the + operator adds the operands.

There are four primary math operator which called arithmetic operator :
  1. Add
  2. Substact
  3. multyply
  4. divide.

The remind operator % returns the remainder of the division.its expression are evaluated form the left to right unless we add parenthesis are unless some operator in the expression have higher precedence then other.the *,/ and % operator have higher ta + and -.

Goto Page:

1 2 3 4 5 6 7 8