Kamis, 28 April 2016

Control statements in java with examples

Control statements in java with examples

Programs in java will be executed in sequential manner means line by line execution of statements.By using control statements we can control the flow of execution.We have three types of control statements in java.Decision...
Baca selengkapnya

Rabu, 27 April 2016

Bitwise operators in java with example

Bitwise operators in java with example

Bitwise operators in java performs operation on bits Bitwise operators performs bit by bit operationsBit-wise operators operates on individual bits of operands. (adsbygoogle = window.adsbygoogle || []).push({});  Bit...
Baca selengkapnya
Ternary operator in java

Ternary operator in java

Ternary operator also known as conditional operator in java.Ternary operator used to evaluate boolean expression and it consists of three operands. (adsbygoogle = window.adsbygoogle || []).push({}); Ternary operator in java...
Baca selengkapnya

Senin, 25 April 2016

Top 20 Java Exception handling interview questions and answers

Top 20 Java Exception handling interview questions and answers

1.What is an exception?Exceptions are the objects representing the logical errors that occur at run time and makes JVM enters into the state of  "ambiguity".The objects which are automatically created by the JVM for...
Baca selengkapnya
3 different ways to print exception message in java

3 different ways to print exception message in java

In Java there are three ways to find the details of the exception .They are Using an object of java.lang.ExceptionUsing public void printStackTrace() methodUsing public String getMessage() method.1.Using an object of...
Baca selengkapnya
throw keyword in java with example

throw keyword in java with example

Throw keyword in javaThrow keyword is used to throw exception manually.Whenever it is required to suspend the execution of the functionality based on the user defined logical error condition we will use this throw keyword...
Baca selengkapnya

Minggu, 24 April 2016

Multiple catch blocks in java example

Multiple catch blocks in java example

Is there any chance of getting multiple exception?Lets see a java example programs which can raise multiple exceptions.package exceptions;public class MultipleCatchBlocks {     /**    ...
Baca selengkapnya
Can we have try without catch block in java

Can we have try without catch block in java

It is possible to have try block without catch block by using finally blockJava supports try with finally blockAs we know finally block will always executes even there is an exception occurred in try block, Except System.exit()...
Baca selengkapnya

Kamis, 21 April 2016

Remove duplicates from arraylist without using collections

Remove duplicates from arraylist without using collections

1.Write a Java program to remove duplicate elements from an arraylist without using collections (without using set)package arrayListRemoveduplicateElements;import java.util.ArrayList; public class RemoveDuplicates {public...
Baca selengkapnya

Selasa, 19 April 2016

Enum in java Example

Enum in java Example

Java Enum:In this tutorial I will explain what is enum, how to use enum in different areas of a Java program and an example program on it.(adsbygoogle = window.adsbygoogle || []).push({}); An Enum type is a special data...
Baca selengkapnya