[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 202
  • Last Modified:

call an Inner Class

Hi,
how can i call my new class from my jsp page?

public class ClassContainningTheInnerClass{
...

class CouutryComparator implements Comparator {
        
              public int compare(Object obj1, Object obj2)
        { IpInfoBean bean1 = (IpInfoBean) obj1;
        IpInfoBean bean2 = (IpInfoBean) obj2;
        return ( bean1.getPercentage() ).compareToIgnoreCase( bean2.getPercentage() ); }
         }
      
}
0
komlaaa
Asked:
komlaaa
1 Solution
 
fargoCommented:
OClass > Outer class
IClass > Inner class

OClass oclass = new OClass();
OClass.IClass innerClass = oclass.new IClass();

What i don't understand from your code is , do u mean CountryComparator is inner class?
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now