Q:

Can you explain to me this second way of instanciating an object in java? 

i started learning java recently and there's on part that confuses me and i need help in. 
from what i know to instanciate a java object this is the syntax
String s1 = new String("This is a string");

however the problem is lately ive come across stuff declared like this 
NumberFormat numF = NumberFormat.getNumberInstance(locale);

Can someone explain this to me

A:

NumberFormat is an abstract class, and so, you cannot instantiate it the "normal way". 
Hence, it has provided a static method getNumberInstance so that you can get a "general-purpose number format". 
In your code, you are using that same method, to get an instance of NumberFormat
Also, this:
NumberFormat numF = NumberFormat.getNumberInstance(locale);

is the same as calling this:
NumberFormat numF = NumberFormat.getInstance(locale);

