Question: public String part6(long val) { // Complete this method such that it returns the long integer value as a string, but the string should be

public String part6(long val) {

// Complete this method such that it returns the long integer value as a string, but the string should be formatted in a nice way.

// by nice way, I mean comma-separated; so if `val` (the arguement) is equal to `1000`, the method must return "1,000"

// if `val` is `12141`, the method must return "12,141".

public int part7(String val) {

// Complete this method such that it returns the index of the first exclamation mark you can find in the string.

}

public String part8(String val) {

// Complete this method such that it returns every part of the string right before the excalamtion mark.

// for example - If `val` is "Hello! How are you?", the method should return "Hello"

// Note: all strings passed to this method will always contain one excalamation mark.

}

public double part9() {

// Complete this method such it returns a random decimal value between 0 and 1

}

public int part10() {

// Complete this method such it returns a random number between 0 and 500

}

public int part11(int start, int end) {

// Complete this method such it returns a random number between the `start` integer arguement and the `end` integer arguement.

}

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!