#Is anyone available to dm

1 messages ยท Page 1 of 1 (latest)

faint vortexBOT
#

<@&987246399047479336> please have a look, thanks.

#

Here is an AI assisted attempt to answer your question ๐Ÿค–. Maybe it helps! In any case, a human is on the way ๐Ÿ‘. To continue talking to the AI, you can use </chatgpt:1108714622413963314>.

#

Sure, I can help you with your Java questions. Please go ahead and ask your questions, and I'll do my best to assist you.

minor abyss
#

Post them here

mossy bolt
#

1)Write a method that will try to remove the first 2 chars of a string but there are two exceptions. The first exception is to keep the first char if it is an โ€˜aโ€™ and the second exception is to keep the second char if it is a โ€˜bโ€™.

removeFirst2("batman") โ†’ "tman"
removeFirst2("abracadabra") โ†’ "abracadabra"
removeFirst2("apple") โ†’ "aple"

public static String removeFirst2(String str)
{

}

#
  1. Given a positive int in the range of 0 to 999 inclusive, write a method that will return the product of the digits.
    (Hint there are 2 different ways to approach this problem, one approach is mathematical, and the other approach is by using strings)

prodOfDigits(28) โ†’ 16
prodOfDigits(82) โ†’ 16
prodOfDigits(823) โ†’ 48
prodOfDigits(555) โ†’ 125

public static int prodOfDigits(int num)
{

}