public class StringRef { public static void main(String[] args) { int x-9; String s1 - "abc"; String s2 - "def"; String s3 = s2; s2 "ghi"; String sup ( x < 15) ? "smal1": "tiny"; System.out.println(s1 + s2.charAt(1) + s3.indexOf ('d')); System.out.println(sup.charAt (2));

EBK JAVA PROGRAMMING
8th Edition
ISBN:9781305480537
Author:FARRELL
Publisher:FARRELL
Chapter2: Using Data
Section: Chapter Questions
Problem 1GZ
icon
Related questions
Question
1- public class StringRef {
2- public static void main(String[] args) {
3 int x=9;
4 String s1 = "abc";
String s2
6 String s3 = s2;
7 s2 = "ghi";
8 String sup = ( x < 15) ? "small" : "tiny";
System.out.println(s1 s2.charAt(1) + s3.indexOf ('d'));
System.out.println(sup.charAt(2));
}}
"def";
9.
10
11
Answer:
Transcribed Image Text:1- public class StringRef { 2- public static void main(String[] args) { 3 int x=9; 4 String s1 = "abc"; String s2 6 String s3 = s2; 7 s2 = "ghi"; 8 String sup = ( x < 15) ? "small" : "tiny"; System.out.println(s1 s2.charAt(1) + s3.indexOf ('d')); System.out.println(sup.charAt(2)); }} "def"; 9. 10 11 Answer:
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Problems on Dynamic Programming
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781305480537
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT