elrancho
12.02.2021 •
Computers and Technology
How do i mark a question brainliest?
Solved
Show answers
More tips
- C Computers and Internet What to Do If Your ICQ Gets Hacked?...
- L Leisure and Entertainment How to Land on the Moon: Your Comprehensive Guide...
- T Travel and tourism How to Use a Compass: A Beginner s Guide...
- C Computers and Internet Porn Banner: What It Is and How to Get Rid Of It?...
- C Computers and Internet Отправляем смс через интернет: легко и просто...
- L Leisure and Entertainment The Best Film of 2010: A Look Back at the Academy Awards...
- H Health and Medicine Simple and Effective: How to Get Rid of Cracked Heels...
- O Other How to Choose the Best Answer to Your Question on The Grand Question ?...
- L Leisure and Entertainment History of International Women s Day: When Did the Celebration of March 8th Begin?...
Answers on questions: Computers and Technology
- A Arts Look at this photo. This feather cloak comes from O A. Australia B. Benin C. the Congo D. Hawaii...
- P Physics Which model best represents the angles at which the atoms are attached to one another?...
- M Mathematics A parking lot began with four times as many spaces in a row as rows. After being expanded, 6 more rows were added and 12 more spaces in each row. The maximum number...
Ответ:
You have to have 2 answers on a question. When you find a question that is pretty reasonable, you should see a little yellow crown.
Explanation:
Practice on this if you need :D
Ответ:
Click on the little crown on the best answer.
Explanation:
I'm the 2nd answer so now you can finally give it to the other one :)
Ответ:
//Method declaration taking a parameter called myString of type String
public static boolean isEmailAddress (String myString){
//checking the @ character exists in string
if (myString.indexOf("@") != -1) {
//checking if only one instance of @ exist in the string
if (myString.indexOf("@") == myString.lastIndexOf("@")) {
//checking if there's no space character
if (myString.indexOf(" ") == -1) {
//checking if there's no newline character in the string
if (myString.indexOf("\n") == -1) {
// checking if there's no tab character in the string
if (myString.indexOf("\t") == -1) {
return true;
}
}
}
}
}
return false;
}
Explanation:
The method takes in a string which is supposed to be an email address and checks if it is a valid email, it returns true if it is a valid email and returns false if not. the method checks the following conditions along the way.
->If "@" exists
->If there's only one "@" in the string
->If space character does not exists
->If newline character does not exists
->If tab character does not exist
it returns true if all the conditions are true.