Submitted by heartin on Mon, 09/30/2013 - 10:05
Decision control statements can change the execution flow of a program.
Decision control statements in Java are:
-
if statement
-
Conditional operator
-
switch statement
Submitted by heartin on Fri, 10/19/2012 - 22:33
Wrapper classes
The wrapper classes provide a mechanism to "wrap" primitive values in an object so that the primitives can be included in activities only for objects, like being added to Collections. There is a wrapper class for every primitive in Java. The wrapper class for int is Integer and the class for float is Float and so on. Wrapper classes also provide many utility functions for primitives like Integer.parseInt().
Submitted by heartin on Wed, 09/19/2012 - 02:29
A variable is something that can hold some data. Class variables or static variables belong to class. Instance variables are non-static variables belong to objects. Local variables are local within blocks or methods and they die when we exit that block or method.
Submitted by heartin on Sat, 08/25/2012 - 01:18
Java doesn't allow operator overloading yet + is overloaded for class String. Here we will discuss examples for use of + with Strings and characters.
Submitted by heartin on Fri, 08/24/2012 - 23:52
You are allowed to put a label on any statement. Labels are given points in code mainly used along with goto in some other languages. Labels are rarely needed in Java, which lacks a goto statement like some other languages.
In java, labels are mainly used by break and continue statements which normally terminate or continue the innermost block.
Pages