Free Oracle 1Z0-501 Exam Dumps Questions & Answers
| Exam Code/Number: | 1Z0-501Join the discussion |
| Exam Name: | Java Certified Programmer |
| Certification: | Oracle |
| Free Question Number: | 147 |
| Publish Date: | Aug 10, 2026 |
| # of views: | 2692 |
|
|
|
Given:
1 . public class Test {
2 . public static void main (String [] args){
3 . string foo = "blue";
4 . string bar = foo;
5 . foo = "green";
6 . System.out.printIn(bar);
7 .}
8 . }
What is the result?
Which two statements are true regarding the creation of a default constructor? (Choose Two)
CORRECT TEXT
Exhibit:
1 . Public class test (
2 . Public static void stringReplace (String text)(
3 .Text = text.replace ('j' , 'i');
4 . )
5 .
6 . public static void bufferReplace (StringBuffer text)(
7 .text = text.append ("C")
8 . )
9 .
1 0. public static void main (String args[]} (
1 1.String textString = new String ("java");
1 2.StringBuffer text BufferString = new StringBuffer ("java");
1 3.
1 4.stringReplace (textString);
1 5.BufferReplace (textBuffer);
1 6.
1 7.System.out.printIn (textString + textBuffer);
1 8.}
1 9.)
What is the output?