mardi 1 juin 2021

How these values are accessed in the code at the runtime?

I am java beginner, and the question may seem too basic. I have this code, class named ur it contains some code. below is the code:

public class ur {
       //some code here and object initializations    

     public static {
        new String("AES/CBC/PKCS5Padding");
        new String("someString");
        new String("otherString");
        new String("12");
        new String("16");
        new String("uniqueString");
      }

//some code here

}

What I am asking here is that how the above values is accessed when needed since it was not assigned to a variable. how is this works? or is it useless code?





Aucun commentaire:

Enregistrer un commentaire