Thank you Gary that worked 100%

On 11/01/2008, Gary Jacobson <[EMAIL PROTECTED]> wrote:
>
> You can only declare anonymous classes inside methods. But you can define
> inner classes in JSP files by using <%! ... %>
>
> e.g.
>
> <%!
> public class myclass{...}
> %>
>
>
> On Jan 11, 2008 9:53 AM, Ryan Meder <[EMAIL PROTECTED]> wrote:
>
> > Hi,
> >
> > Does anybody know if its possible to declare a class within a method in
> > Java.
> >
> > example
> >
> >
> > public void mymethod(){
> > **
> > *    public* *class* myclass{
> >
> > *          public* String name;
> > *          public* String technician;
> > *          public* String customer;
> > *          public* String arrive;
> > *          public* String depart;
> > *          public* String time;
> > *          public *String timeRate;
> > *          public* String timeAmount;
> > *          public* String travel;
> > *          public* String travelRate;
> > *          public* String travelAmount;
> > *   *}
> > }
> >
> > I am actually wanting to declare the myclass object within a jsp. I know
> > i can just declare an new class as a POJO with the rest of the classes and
> > this will solve my issue but i need to be able to declare an object from the
> > jsp due to architectural reasons.
> >
> > any help is appreciated.
> > --
> > Regards,
> >
> > Ryan Meder
> >
> >
> >
>
> >
>


-- 
Regards,

Ryan Meder

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

Reply via email to