Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Recent content by nebmucoy674

  1. nebmucoy674

    Java Using random number to multiply by user input

    Here is my final code and still having problems: 1. Calculations are still off and making negative numbers where there shouldn't be. 2. My if/else statement is printing below as opposed to on the same line as the "Number of days left". import java.util.Random; import java.util.Scanner...
  2. nebmucoy674

    Java Using random number to multiply by user input

    I used a code similar to what I had before when generating a random number at the end of a username. System.out.println("Um, it's 2022, that username isn't available. How about " + one + (random.nextInt(999))+ "?"); The 999 in the code being the range that the integer could go up to (so I...
  3. nebmucoy674

    Java Using random number to multiply by user input

    Hey all, I want to create a random number and multiply it by a users input; the objective is to: Total number of zombies = population - (A random number between: minimum expected survivors and (5 * minimum expected survivors).... So the input is going to be the minimum expected survivors...
  4. nebmucoy674

    Java Simple 10 second question for if an integer is defined in blocks of code

    Hey, maybe a learning experience for new people. Watching something on youtube it said that a string/integer is defined in each new block of code. So why is 9 still showing instead of 6 in the console After watching this video on blocks of code I thought that after the variable is defined...
  5. nebmucoy674

    Java Package required in .java using Eclipse? (first project)

    Hey, thank you for your help!! Sorry for the belated appreciation. I've noticed that I don't get "layman's" terms on most of what I ask; although to be fair, as much as I admire people that know this stuff, I can't seem to get a simplified answer. If you have time, please look at my other...
  6. nebmucoy674

    Java Creating a google search to create a URL

    Exception in thread "main" java.lang.Error: Unresolved compilation problems: Syntax error on token(s), misplaced construct(s) Syntax error on token "22", ? expected after this token Syntax error on token ":", Expression expected after this token at...
  7. nebmucoy674

    Java Creating a google search to create a URL

    I originally thought I had this one... Use scanner, get input from user, then concatenate it to a google search. My teacher stated the follow rules for URL's: 1. Replace +'s with %2B 2. Replace all spaces with +'s 3. Replace all "'s with %22 So here I am, doing what I thought was said, and...
  8. nebmucoy674

    Java Package required in .java using Eclipse? (first project)

    Hey all, I hope this thread finds everyone well! I'm new to Java and this is literally my first project. The school I attend requires us to use Eclipse. When I start a new "class" (which please correct me if I'm wrong is about the same thing as a new java program inside a java project?)...
  9. nebmucoy674

    JavaScript Multiple Scripts = Multiple Problems?

    So confused by your F12 reference until I looked up the shortcut for the console output on Chrome (which I now realize is immensely useful); you have taught me to help myself, which is much more useful than a direct answer! Thank you for your time and help! :)
  10. nebmucoy674

    JavaScript If/Else JS with time of day

    Nevermind, realized I had the >= in the "else". However, I'm still having problems with running multiple scripts after each other, such that my next script says what day of the week it is (still using if/else, I believe I posted a question about it earlier) and now it does not show.
  11. nebmucoy674

    JavaScript If/Else JS with time of day

    Again, thank you all for your help. I'm being taught a class online and HAVE to follow a If/Else script for the current project. I've tried multiple times with no success.... is it so simple I can't see it? Furthermore, is there an online resource that can check JS code pretty well with a...
  12. nebmucoy674

    JavaScript Greeting with day of the week

    Why is this JS not showing the appropriate greeting? I'm new to this, but I thought the getDay() would result in 0-6, with 0 and 6 being weekend, resulting in the appropriate greeting. Thank you! <p id="weekday"></p> <script> const day = new Date().getDay(); let greeting; if (day = 0) {...
  13. nebmucoy674

    JavaScript Multiple Scripts = Multiple Problems?

    Hey all, First, thank you for the forum; I've asked only one question and got an answer much quicker than asking my local college professors..... So from my previous post it seems I have problems with more than (1) script on one page. Is that why I can't get the first and third JS to run...
  14. nebmucoy674

    JavaScript (2) JS scripts resulting in the same array (for the first script) showing for both

    Thank you so much for your response; it's much appreciated. I was trying to make a "for" and a "while" script, but have not seen an advantage really yet for either one of them. So, with each new script needs a different i (initial) and text variable, correct?
  15. nebmucoy674

    JavaScript (2) JS scripts resulting in the same array (for the first script) showing for both

    Hey all, I'm beginning at JS and was going through some exercises online. I'm attempting to have (2) different arrays show when the appropriate button is clicked. However, the "cities" show for both, as opposed to the "countries" for the second. Any help is appreciated. <body> <...
Back
Top Bottom