Number of View: 161
21) boolean :
boolean is one of the primitive datatype in java that contains either true or false value.
Ex : boolean b=true;
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.
A break statement transfers the control .break statement has the following uses:
- It terminates the statement in Switch Statement.
- It is used to exit loop.When a break statement is used inner loop it only terminates inner loop,outer loop remains unaffected.
binarySearch() method is used to search for a specified value.This method is applied for sortedArrays.
static int binarySearch(byte array[ ], byte value)
static int binarySearch(char array[ ], char value)
Number of View: 51
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:
Number of View: 58
To find cube root of a number in java use cbrt method of Math class.
|public static double cbrt(double a)
If argument is Nan the result is Nan. Continue reading
Number of View: 21
To find square root of a number in java use sqrt method of Math class. Continue reading
Number of View: 35
To convert negative number to positive in java use abs function of Math class.
Abs : Abs returns the the absolute value of a number.
ABS of positive number will return positive number.
ABS of negative number will return positive number. Continue reading
Number of View: 241
11) ArrayList :
Arraylist is similar to array but arraylists are dynamic in nature except arraylist objects grow and shrink as needed.Arraylist is an resizable array.Adding and deleting elements in array should be manually.Developer has to implement logic to add and delete elements.
Using arraylist adding and removing elements is made easier with help of add() and remove() methods. Continue reading
Number of View: 307
Annotations are meta tags.Annotations allows us to add metadata to classes,methods,fields,packages.Annotations are not part of the code and annotation dont directly impact our code. These meta data can be used by java tools both at compile time at run time.
Annotations have the following uses :
- Information for the compiler : Annotations provide information to the compiler to detect errors or surpress warnings.
- Compiletime and runtime processing : Annotations provide information to the software tools to generate code,xml files and so forth.
Here are some of the predefined or built in annotations :
We can create our annotations. Annotations are declared with @. Continue reading
Number of View: 84
Explain Order By clause with examples?
Order By clause is used to sort the data retrieved using query.
Order By Clause sorts the data in ascending or descending order.
Order By Clause must follow either where or from clause. Continue reading
Number of View: 70
Difference between where clause and Having clause with example
| Where clause
|| Having clause
|Where clause can be used with select,update,delete
||Having clause is used for only select query.
|Where clause is applied on each and every row.
||Having clause is applied on group of rows. Continue reading
Number of View: 93
Explain Having clause in sql?
1) Having clause is used to filter group of rows.
2) Having clause is placed after group by clause.
3) Having clause is used to compare group values like sum,count,max,min,avg etc.
4) Having clause is used only for select query. Continue reading