Custom4446 Custom4446
  • 26-10-2020
  • Computers and Technology
contestada

Can someone tell me why this code in Java won't run?

if (s.toLowerCase().equals(s.toUpperCase()))
{
System.out.println("*");
}

Respuesta :

regularjoe24
regularjoe24 regularjoe24
  • 26-10-2020

Answer:

try typing the following:

String lc = s.toLowerCase();

String uc = s.toUpperCase();

if(lc == uc){

System.out.println("*")

}

Answer Link

Otras preguntas

How do you write standard form 24 ten thousands
The photosphere is the innermost layer of the Sun, and it's also the
Q. What is a CORK? A. It is the OUTER COVERING OF A TREE. is this answer correct?
In England's constitutional monarchy, the prime minister serves as the __________.
which layer of atmosphere does condensation occur
In what three ways do the state legislative branches resemble the federal government's legislative branch?
To become a citizen of the United States, you must A. have lived in the United States for at least six months. B. be at least 21 years old. C. pass an English a
Three isotopes of oxygen are oxygen-16 oxygen-17 and oxygen-18. Write the symbol for each, including the atomic number and mass number
Luke does 10 spelling test, each out of 10 marks. Luke scored his worse result on the first test and then always either improved or scored the same result. When
Would a rose petal cell be eukaryotic or prokaryotic? I know that prokaryotic is unicellular and eukaryotic is mostly multicellular.