Search:

Type: Posts; User: mamaass

Search: Search took 0.08 seconds.

  1. Re: Validating user input if it is in the correct format.

    can you explain it in english please? if you know what i mean.. :)
  2. Re: Validating user input if it is in the correct format.

    edited it. the output if i run the code is there. i added comments in between the codes to let you know what i did.
  3. Validating user input if it is in the correct format.

    Hi, my prof. asks us to write a conversion program in from binary to decimal, decimal to binary, etc.. It should have a menu system and a method should validate if the user input is number and is in...
  4. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    i made some changes on this one and has no errors on it.


    import java.util.Scanner;

    public class assignmentA
    {
    public static void main(String[] args){

    int[] newArray;
  5. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    what will i do so that it will check the element that the user's input and make sure it's not less than 4?
  6. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    ok i changed some of the parts to


    import java.util.scanner;

    public class assignmentA
    {
    public static void main(String[] args){

    int[] newArray=new int[5];
  7. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    how can i use an array in an if statements then? kinda confused when i put them together. its not state in the toturials.
  8. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    i tried the if statement.


    import java.util.scanner;

    public class assignmentA
    {
    public static void main(String[] args){

    int[] newArray=new int[5];
  9. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    reading it now. in this case, what would you use? while loop or if-else statement?
  10. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    im trying to to check all the elements that the users will be inputting if it is less than 4. if it is then it must show this:

    System.out.println("The number "+ newArray +" is less than 4!");
  11. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    yes. i will be changing that in a bit. the name of the file should be the same with the class name.



    do you know how to fix that one? it says i need to make the the number that user inputted so...
  12. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    technically, i only have 2 errors since the 1st is easy to fix. anyone knows how to fix the remaining two?
  13. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    ok i have checked again and the errors says.

    Main.java:3: class assignmentA is public, should be declared in a file named assignmentA.java
    public class assignmentA
    ^
    Main.java:10:...
  14. Replies
    22
    Views
    1,964

    Re: Help me check my assignment if it is correct.

    i compiled it in an online compile called Codepad and the error only says

    error: 'import' does not name a type
  15. Replies
    22
    Views
    1,964

    Help me check my assignment if it is correct.

    Hi my professor wants me to make a program this this set of guidline.




    i don't know if my code is correct and have any errors, please if you see any, try to tell me what it is and how to fix...
  16. Replies
    6
    Views
    1,429

    Re: Can you guys help me fix my assignment

    import java.util.Scanner;

    public class assignmentB
    {
    public int calc(){

    int number1;
    int number2;
    int number3;
    int sum;
  17. Replies
    6
    Views
    1,429

    Can you guys help me fix my assignment

    this is the program that i need to do

    You are required to write a command line program in Java that declares three numbers.
    Write a method called calc() that takes in the three numbers as...
Results 1 to 17 of 17