Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.
Sanzio Angeli
Why is this Java program not working?
Here is the program
import cs1.Keyboard;
import java.util.ArrayList;
public class EmailGatherer
{
public static void main (String []args)
{
String inputlist = Keyboard.readString();
int length = inputlist.length();
System.out.println (length);
char character;
ArrayList<String> emails = new ArrayList<String>();
int emailchar;
String toomany = "d";
for (int i = 0 ; i <= length ; i = (i + 1))
{
character = inputlist.charAt(i);
if (character == '@')
{
String temporaryemail = "";
emailchar = i;
while (toomany != " ")
{
emailchar = (emailchar);
character = inputlist.charAt(emailchar);
toomany = Character.toString (character);
}
emailchar = emailchar +1;
toomany = Character.toString (character);
while (toomany != " ")
{
character = inputlist.charAt (emailchar);
toomany = Character.toString(character);
temporaryemail = temporaryemail + toomany;
emailchar = emailchar + 1;
}
emails.add (temporaryemail);
emails.add ("jdfksla");
}
}
System.out.println (emails.toString());
}
}
1 AnswerProgramming & Design7 years agoHow to remove the 123srv virus?
I have a mac, and recently have been getting these ridiculous popups from 123srv. These are really annoying and I have deleted the extensions in both google chrome and safari. I still am getting these popups and do not know how to fix the problem.
Any help would be greatly appreciated.
2 AnswersSecurity7 years agoNeed some help with java?
So this is what I have so far. I'm just learning how to write. I'm writing this program to do some basic chemistry for me instead of having work out all the problems by hand, I figured if I knew the material well enough I could just do my homework with it. Everything compiles and runs okay, it just always outputs that the mass of KNO3 and Sucrose is 0. I can't seem to get the math right I guess. Any help would be appreciated
import cs1.Keyboard;
public class RCandyWeights
{
public static void main (String []args)
{
System.out.println("**************************************************************");
System.out.println("This program will compute the different weights of \nchemicals needed to make the various compounds listed below.");
System.out.println("--------------------------------------------------------------");
System.out.println("1. R-Candy");
System.out.println("2. Black Powder");
System.out.println("--------------------------------------------------------------");
char run = 'y';
while (run == 'y')
{
System.out.println("Input the number of the chemical you want to make");
int chem = Keyboard.readInt();
double mass, molcompound, mol1, mol2, mol3, mass1, mass2, mass3;
//For R-Candy-------------------------------------------------------------------------------
//mol1, mass1 = KNO3
//mol2, mass2 = Sucrose
if(chem == 1)
{
System.out.println("How much R-Candy do you want to make? (In grams)");
mass = Keyboard.readDouble();
molcompound = ((mass) / 6564.3);
mol1 = (molcompound * (48 / 53));
mass1 = (mol1 * 101.1);
mol2 = (molcompound * (5 / 53));
mass2 = (mol2 * 342.3);
System.out.println("");
System.out.println("Amount of KNO3: " + mass1 + "grams");
System.out.println("Amount of Sucrose: " + mass2 + "grams");
}
}
}
}
2 AnswersProgramming & Design7 years agoMy micro SD card file will not run?
I recently accidentally deleted a video file on my micro sd card, and I ran recuva to get it back. I currently have the recovered file, however I cannot get windows media player to play the video. It says something about a sound error? IS there anything I can do to even get just the video part, maybe without the sound?
Thanks
3 AnswersSoftware7 years agoPlaces to beat the world record paper airplane throw?
I am thinking about trying to beat the world record paper airplane throw (226 feet), and I am trying to find a place to do it. It should be: indoors, have a TALL ceiling, and be longer than 226 feet! and free... If you guys have any ideas, please let me know!
5 AnswersHobbies & Crafts7 years agoI have 20/400 vision, can I be an astronaut?
I've wanted to be an astronaut my whole life and am afraid my eyesight will hinder this dream. My prescription is -5.00 in both eyes and I believe this converts to about 20/400. How will this affect me?
5 AnswersAstronomy & Space8 years agoany ideas on how to make a rope swing better?
we have one awesome rope swing at a local park and are looking for was to make it even awesomer! (yes thats a word)
1 AnswerOther - Games & Recreation8 years agoHow do i find the inverse of this equation?
I know to find the inverse you switch the x and y and then solve for y, but how i do it in this problem?
x= (1 3y) / (5-2y)
I already switched the variables. My issue is more getting the second y variable out of the bottom of the fraction. We learned how to do it over the school year but i forgot for summer work...
Thank you!
2 AnswersMathematics8 years agoAbsolute value/ inequality help?
The question goes:
Use absolute values to define the interval (or pair of intervals) on the real line for All numbers that are more than 6 units from 2.
More than the answer, I would like it if someone could explain how to do the problem so I know how to do the rest of them.
Thanks!
3 AnswersMathematics8 years agowhat is the name of this plant outside?
its everywhere and i live in virginia. its alwasy brown, is brush like, and has long brown stalks about 2-3 feet high that always look dead?
1 AnswerBotany9 years agoHow are vfc internals? Airsoft tech question...?
Specifically...
http://www.evike.com/product_info.php?products_id=...
Is it ready for an 11.1 v lipoly?
Also how are your experiences with vfc and am i gunna need much repair work in the future with the 11.1 v?
2 AnswersOther - Outdoor Recreation10 years agoWhat is the difference between Picatinny and RIS rails? Airsoft Rails?
Can someone explain the difference between all the other types of rails too? Like what does weaver or QD mount mean? Just kinda explain rails in general... 10 points to who can best describe rails/ different types/terminology/etc...
Thank you
2 AnswersOther - Outdoor Recreation10 years agoI need a good airsoft team name?
Theres 7 of us and we where thinking "Something Saints". like replace "something" with another word we where thinking "hells saints" but didnt really like it
1 AnswerOther - Outdoor Recreation1 decade agoThese kids keep destroying our airsoft field?
We had a pretty good field set up, but these kids came by and wrecked it all. They are about 16-17, (I know this because we caught them once where our field was and chased them down the street with our airsoft guns) and we are only 13-14. We have tried to rebuild it a couple times and they just keep destroying it. Should we just shoot them whenever we see them? What should we do to get them to stop?
7 AnswersOther - Outdoor Recreation1 decade agoWhat is a good high rof setup?
I have an Echo 1 SCAR and I am hoping to get 25-30 rps. I have about 100$ left to spend and have already put in a g&p m120 high speed motor and a 9.6 volt battery. I also have a m100 spring and a 6.03mm barrel. Everything else is stock.
Is it possible to get this rate of fire this cheaply?
If so, how?
3 AnswersOther - Outdoor Recreation1 decade agoI need a good vest/chest rig for airsoft under 75$?
Preferably a tan of some sort and molle with a lot of space. I am also about 5ft tall and weigh 90lbs
3 AnswersOther - Outdoor Recreation1 decade agowhat is a good gas pistol for airsoft?
i need a good gas pistol for airsoft.
prefferably propane or green gas, easy trigger pull, and under 70$
6 AnswersOther - Outdoor Recreation1 decade ago