Example & Tutorial understanding programming in easy ways.

what usage of Declaration Tag explain with example?.

Declaration tag is used to define functions, methods and variables that will be used in Java Server Pages(JSP).

Notation of the Declaration tag is given below:

<%! %>

At the start of Declaration tag one must place <%! Inside Declaration tag one can declare variables or methods. Declaration tag ends with the notation %>. Also care must be taken to place a semicolon that is ; at the end of each code placed inside Declaration tag.

General syntax of Declaration Tag:

<%! //start of declaration tag


statement2; //variables or methods declaration



%> //end of declaration tag

For example:


private int example = 0 ;

private int test = 5 ; %>

Read More →
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!