Which code fragment prints Hello World?

Given the code fragment: Which code fragment prints Hello World?

Given the code fragment: Which code fragment prints Hello World?

A.
sb.insert(0,”Hello “); System.out.println(sb);

B.
sb.append(0,”Hello “); System.out.println(sb);

C.
sb.add(0,”Hello “); System.out.println(sb);

D.
sb.set(0,”Hello “); System.out.println(sb);D

Explanation:



Leave a Reply 2

Your email address will not be published. Required fields are marked *