#all letters in string same

1 messages · Page 1 of 1 (latest)

opal flareBOT
#

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

soft locust
#

what's unclear to u? where are u stuck at? can u share ur current attempt?

opal flareBOT
#

all letters in string same

#

Changed the title to all letters in string same.

zealous niche
soft locust
#

sounds good. whats the issue?

#

and please share the entire code

zealous niche
#
for (int i = 1; i < lowercaseInput.length(); i++) {
            if (lowercaseInput.charAt(i) != firstChar) {
                return false; character
            }
        }
opal flareBOT
zealous niche
#

thats all i got till now

soft locust
#

entire code please

#

thats missing a class, main method etc

zealous niche
#
public static boolean areAllLettersSame

{
for (int i = 1; i < lowercaseInput.length(); i++) {
  if (lowercaseInput.charAt(i) != firstChar) {
    return false;
    character}
}
opal flareBOT
soft locust
#

@zealous niche if u ask chatgpt for the solution, u wont really learn it and will be stuck on the very next task again

#

it would be helpful if u answer the questions, then i can assist u through it and get ur attempt working

#

the code u provided has some syntax errors and wont compile like that

#

and it's also missing a main method, so u can't even run it and try it out like that

soft locust
#

its missing the paranthesis for the method params, the definition of what lowercaseInput and firstChar is, a return true case and that character thing is misplaced

zealous niche
#

is it ok if i ask questions?

soft locust
#

it looks like u went head first into a too advanced topic instead of first learning the basics

soft locust
zealous niche
#

alright thanks

zealous niche
#

im reaally lost when you say things as specific names

#

for each part

#

i wasnt taught with it

#

so i was right on the first part right?

soft locust
#

perhaps step back and learn programming with a proper resource, such as mooc

zealous niche
soft locust
opal flareBOT
#

MOOC is a completely free introductory Java course created by the University of Helsinki, it is a great way to learn Java from the ground up.

It consists of two parts, one at beginner, and another at intermediate level. The end of the course is marked by creating your own Asteroids game clone!

Even though the instructions show how to configure and use NetBeans for the course, you can use IntelliJ. To use IntelliJ, simply install the TMC plugin by opening IntelliJ -> File -> Settings -> Plugins and searching for TMC. You will then be able to use IntelliJ to complete MOOC.

Visit MOOC here: https://java-programming.mooc.fi/
(the course is available in both English and Finnish)

About the course - Java Programming

zealous niche
#

cuz i was trying so desperately XD

#

i have an idea of things

#

but to many other things i have issues

#

its okay if i re-try to do it

#

and send it to you?

#
public class SameLetterChecker 
{
    public static boolean areAllLettersSame
    {
        for (int i = 1; i < lowercaseInput.length(); i++)
        {
          if (lowercaseInput.charAt(i) != firstChar)
         {
          return false;

}
soft locust
#

u didnt really fix any of the mentioned issues

#

id suggest u start with hello world and get a proper ide

#

it will tell u when u do mistakes

zealous niche
#

im editing it xD

#

srry

zealous niche
soft locust
#

yeah but its way more than just that. stop doing pseudo

#

get a ide, put the full entire code in it and hit the run button

#

validate if it works or not

#

and if not, read the error messages

soft locust
#

we recommend IntelliJ

zealous niche
#

alright lemme go for it

soft locust
#

at this point, u could also just follow mooc and learn everything by doing that

zealous niche
#

im installing it

#

its really heavy

#

its taking me a while

zealous niche
#

srry im reaaally lost