Answer:
String word = "George slew the dragon";
int pos = word.indexOf("dr");
String drWord = word.substring(pos, pos+4);
System.out.println(drWord);
Explanation:
Assuming dr is always there, we don't have to check the validity of 'pos'. Normally, you would!
Computer - Input Devices
Keyboard.
Mouse.
Joy Stick.
Light pen.
Track Ball.
Scanner.
Graphic Tablet.
Microphone.
Computer - Output Devices
Monitor.
Printer.
Headphones.
Computer Speakers.
Projector.
GPS.
Sound Card.
Video Card.
Answer:
The expression which represent the value is the i-th element of the j-th row is x[i][j].
Explanation:
As given in the question that the array is two-dimensional array means that it stores the elements in the row and column format .In the given question i and j are two variable where i representing the row in the two-dimensional array and j represent the column in the two-dimensional array .
So the expression which represented the value of the i-th element of the j-th row is x[i][j].it means firstly it fetches all the row of the first column then soon.