By itself %s(%s)
is simply two string placeholder one after the other, with the second being surrounded by parentheses that have no syntactic meaning as far as format
is concerned.
What this piece of code does is simply substituting the content of tabName
for the first %s
and the result of
String.format("%s,%s,%s,%s,%s,%s,%s","id int primary key auto_increment","surname varchar(50)","name varchar(50)","age int(3)","course int(1)","group varchar(50)","stateFunded int(1)")
for the second one, hence creating something along the lines of
create table if not exists tabName( id int primary key auto_increment, surname varchar(50), name varchar(50), age int(3), course int(1), group varchar(50), stateFunded int(1))
for whatever value tabName
has.