Submitted by heartin on Thu, 10/23/2014 - 10:07
The while statement
The “while loop” is an alternative to “for loop”. a “for loop” is usually used when the number of times the block is to be executed is known. A “while loop” is usually used when the number of times the block is to be executed is not known, like prompting the user whether to stop executing during every iteration.
The syntax of “while loop” is:
while (<condition>) <statements>;
Submitted by heartin on Tue, 10/29/2013 - 09:29
Access modifiers are used to specify the accessibility or access levels of a type (class, interface) and its members (methods, variables and even constructors). There are three access modifiers and four access levels in Java. The three access modifiers are are private, protected and public. Four access levels (from most restricted to least restricted) are private, default (no modifier), protected and public.
Submitted by heartin on Tue, 04/22/2014 - 23:19
Gradle lifecycle consist of three phases: initialization, configuration, and execution:
During Initialization, Gradle decides which projects are to participate in the build.
During Configuration, task objects are assembled into an internal object model, usually called the DAG (for directed acyclic graph).
Submitted by heartin on Fri, 04/10/2015 - 08:15
How can you call a JSP page using a request dispatcher?
How can you suppress direct access to a JSP file through a client request?
Submitted by heartin on Fri, 03/20/2015 - 09:24
What are the three ways in which you can tell the container that your class is a servlet?
Compare filters with RequestDispatcher mechanism.
Can you include or forward to filters using the RequestDispatcher mechanism?
What will happen if you call two RequestDispatcher forwards or includes from within a servlet's doXXX method?
Can you use wrappers to have two RequestDispatcher forward requests without any exception?
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:
Submitted by heartin on Sun, 10/20/2013 - 21:31
Looping constructs in Java are:
Do while statement
We will see for and for-each here. We will see while, do while, break and continue statements in next note.
The for statement
Syntax of for loop is:
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, 10/24/2014 - 03:55
There is a class in Java called Object and is present in the package java.lang.Object. This is different from the concept of objects in object oriented programing, and begenners may get confused. Note that is is just a class in Java with the name as Object.
Object class API basics
Submitted by heartin on Fri, 02/14/2014 - 07:52
A String is a sequence of characters (e.g. "Hello World").
A String is an object in java, and not a primitive.
We can create a String object in two ways:
Assigning a String literal to a String variable