Originally posted by Alex Sbityakov:
It seems the nesting of /*..*/ style comments are not allowed, precisely for the reason that the starting tag of the second set of comments is ignored by the compiler. However, the nesting of // and /*..*/ style comments are OK.
In your code the first comment starts with /* and doesn't end until jkktj*/. The whole first comment is
/* comment
if (true) {
temp1 temp = new temp1();
System.out.println("Done");
}
/*jkktj*/
then there is a second comment /*comment*/.
So compiler sees no problem.