Qtr No. 213, New Town Yehlanka Indore 454775
Consider the following code snippet. Assume all imports are done and preview feature is enabled. Predict the output
int x = 50;
int y = 30;
StringTemplate st = StringTemplate.RAW."\{x} + \{y} = \{x - y}";
System.out.println(st.fragments()); //Line1
System.out.println(st.values());
Compilation error at Line1- undefined fragments() method.
[, + , = , ]
[50, 30, 20]
[, + , = , ]
[x, y, x-y]
[, + , = , -, ]
[50, 30, 20]
To get all Infosys Certified Java SE 21 Developer Exam questions Join Group https://bit.ly/infy_premium_group
We're passionate about offering best placement materials and courses!! A one stop place for Placement Materials. We daily post Offcampus updates and Placement Materials.
Qtr No. 213, New Town Yehlanka Indore 454775
admin@prepflix.in