Exercise 4 Week 3 - Java Tutorials DoubleTrouble-IndexOf isDouble equals method - Static Variable

Опубликовано: 04 Март 2025
на канале: Red Stag Digital
270
4

For more: http://redstagdigital.com/

Java API: IndexOf()
http://docs.oracle.com/javase/7/docs/...)

Java API: isDouble()
http://docs.oracle.com/javase/7/docs/...

Java Stackoverflow: IsDouble()
http://stackoverflow.com/questions/31...

Write a static method called isDouble that accepts one parameter, a string, and returns true
if the first instance of "x" in the string is immediately followed by another "x". If the
first instance of "x" in the string is not immediately followed by another "x", then the
method should return false.
Write a driver program called DoubleTrouble that contains the method isDouble and calls it
four times using the parameters listed under Expected Output below.