Aug 31

Java Glossary | Java Dictionary-Part 4

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

Aug 27

Java Glossary-Java Dictionary-A-Part 3

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

Aug 26

Java Glossary-Java Dictionary- A-Part-2

6) Annotations:

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 :

  1. Information for the compiler : Annotations provide information to the compiler to detect errors or surpress warnings.
  2. 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 :

1) @deprecated

2) @Override

3) @SupressWarnings

We can create our annotations. Annotations are declared with @. Continue reading

Aug 23

Difference between having and where clause Sql with example

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