my question is if intern is working with string and string having a SPC(string pool constant) for it and intern concept also working with integer also, so is there any integer pool constant?if not then how its working?
class InternExample
{
public void print()
{
Integer i=10;
Integer j=10;
String c="a";
String s="a";
System.out.println(i==j);// prints true
System.out.println(c==s);//prints true
}
public static void main(String args[])
{
new InternExample().print();
}
}