Sep 08

Explain Final parameters with example in java?

Number of View: 73

Final Parameters:

1) Formal paramters can be declared as final .

2) A formal parameter is initialized automatically with the value of the actual parameter when the method or the constructor is invoked.

3) Therefore final formal parameter value cannot be changed inside the method’s or the constructor’s body. Continue reading

Sep 01

Java Glossary | Java Dictionary-part 5

Number of View: 451

21) boolean :

boolean is one of the primitive datatype in java that contains either true or false value.

Ex : boolean b=true;

22) Boolean:

Boolean is an wrapper class which wraps a value of primitive type in to Object.Boolean class has many methods to convert Boolean value to Strings and other methods for dealing boolean value.

23) Bootstrap class loader :

This class loader loads java core classes such as java.lang,java.util.It loads the classes from JRE/lib/rt.jar.

24) breakStatement:

A break statement transfers the control .break statement has the following uses:

  1. It terminates the statement in Switch Statement.
  2. It is used to exit loop.When a break statement is used inner loop it only terminates inner loop,outer loop remains unaffected.

25) binarySearch():

binarySearch() method is used to search for a specified value.This method is applied for sortedArrays.

syntax :

static int binarySearch(byte array[ ], byte value)
static int binarySearch(char array[ ], char value)

Aug 31

Java Glossary | Java Dictionary-Part 4

Number of View: 185

16) Arithmetic operators:

Arithmetic operators are used to perform arithmetic operations

like addition,subtraction etc.Arithmetic operators are called binary operator because it acts on two operands at a time.

Here are the list of arithmetic operators in java:

Operator Meaning
+ Addition
- Subtraction
* Multiplication
/ Division
% Modulus operator

Continue reading