So our computer science teacher taught us how to convert int
s to String
s by doing this:
int i=0;
String s = i+"";
I guess he taught it to us this way since this was relatively basic computer science (high school class, mind you), but I was wondering if this was in some way "bad" when compared to:
int i=0;
String s = Integer.toString(i);
Is it more costly? Poor habit? Thanks in advance.