Configure HTML/JavaScript

Tuesday, September 25, 2012

Java String class, Constructs and methods

Java String Class:

Constructs
Java string class have many constructs to handle java strings. this constructs takes different parameters to handle java string in different manners.

String s = new String(); //string empty constructs

char chars[] = { 'a', 'b', 'c' };
String s = new String(chars);
System.out.println(s.length());  //out put will abc

Methods:

it also provides many methods to handle strings. one of the simplest method is length method. it will return the length of the string.

String s = new String(chars);
System.out.println(s.length());

Other methods are their to handle string. please refer complete reference java for the complete details.

StringBuffer class:

it provides many methods to handle advanced string. like you can append string at a special position. you can insert string, etc



// Demonstrate append().
class appendDemo {
public static void main(String args[]) {
String s;
int a = 42;
StringBuffer sb = new StringBuffer(40);
s = sb.append("a = ").append(a).append("!").toString();
System.out.println(s);
}
}
The output of this example is shown here:
a = 42!



Sunday, September 23, 2012

Relocating Skills

Relocating Skills:


Relocation is the most frequently happenings in our dally life. Most of us relocate every day like relocating from home to work place <> work place office. relocating to vacation spot, hospital for a out door visit, etc.



Relocation like changing you living place is required more concentration. this types of relocation changes many factors of our daily life.

Mainly we relocate due to our job changes. in this case we relocate from one position to another with lot of changes with us. if the job position changed then new position roles. new friends, new environment , etc. we need special care in this situation as we most of us ignore these situation and hopes to automatically to be arranged.


Few things we always need to think while relocating is specially thoughts should not be changed

JSP tags

JSP tags:

JSP tags are mainly divided into three parts.
1. Directive(page,include,tag libs)

  • Page (to include java library and other things)
  • Include ()
  • Tag library

2. Scripting(declaraion,scriptlet,expression)

  • Declaration
  • Scriptlet (original java code which embded inside html code with help of <%%>)
  • Expression

3. Action


 the easy way to remember is



JSP tags->Directive(page,include,tag libs)->scripting(declaraion,scriptlet,expression)->Action

description:

JSP tags
     ->Directive(page,include,tag libs)
     ->scripting(declaraion,scriptlet,expression)
     ->Action