Search:

Type: Posts; User: Norm

Page 1 of 20 1 2 3 4

Search: Search took 0.20 seconds.

  1. Replies
    1
    Views
    55

    Re: java Conversion & Casting

    What do you think?
    The code needs lots of print statements to have output. Try adding print statements so you can see what the values are for each statement and variable.

    Please edit your post...
  2. Re: BlueJ Auction Project calling external methods, using ArrayLists, and for-each loops

    What variable has the null value when line 134 is executed? Why doesn't that variable have a valid value?

    Note: The posted code does not compile for testing because of missing statements.
  3. Replies
    1
    Views
    40

    Re: Switch with modulus value

    Print the value of i%5 so you can see the value that the switch statement sees.
    Notice the missing break statement for case 1.

    Please edit your post and wrap your code with code tags:


    ...
  4. Replies
    4
    Views
    1,089

    Re: Access Control Exception

    Please post the full text of the error message and the java code where the exception happened so we can see it.
  5. Replies
    2
    Views
    65

    [SOLVED] Re: Error message printing twice

    It would be helpful for debugging if the value returned by the nextLine method were saved in a variable and printed out so the user could see what the Invalid value was.

    I suspect the problem is...
  6. Replies
    5
    Views
    54

    Re: Problem using the JFileChooser

    Do you know what an assignment statement is? It is a statement where a variable is assigned a value:
    theVariable = theValue; // assign theValue to theVariable

    I do not see any code that assigns...
  7. Replies
    5
    Views
    54

    Re: Problem using the JFileChooser

    You missed this question in my last post:
    Where is the variable: calc assigned a value?

    Its value will be null if it is not assigned a value.

    Reaching into another class for a value is a poor...
  8. Replies
    5
    Views
    54

    Re: Problem using the JFileChooser

    Where is the variable: calc assigned a value? I do not see where calc is declared or assigned a value in the posted code.
  9. Re: Alarm clock won't tick, can't call method because of dereferencing??

    Please explain.
    Copy the full text of the error messages and paste it here so we can see what happened.
  10. Re: Alarm clock won't tick, can't call method because of dereferencing??

    There is no need to call a method to get the value of a primitive. The variable itself contains its value.
  11. Replies
    3
    Views
    90

    Re: Calculator Method issue

    Please explain what you do not understand. Some of the issues could be:
    how to call a method to prompt for and receive 2 int values
    returning an int array containing the 2 values
    receiving an int...
  12. Replies
    1
    Views
    57

    Re: Java Click button not working

    This code looks like javascript which is not the same as java.
    Try asking the question on a forum for javascript.
  13. Re: Alarm clock won't tick, can't call method because of dereferencing??

    I do not see a variable: alarmMinutes in the code. Are you sure that is the variable name?
    I do see a variable: alarmMinute is that what is in the error?

    Where is the statement with the getValue...
  14. Replies
    14
    Views
    99

    Re: Java Reflection API

    Continue here if on the same program and problem.
  15. Replies
    14
    Views
    99

    Re: Java Reflection API

    Thanks. From your answer, I assume the program accesses the class files via the default classpath set when the program executes.

    How does that arrangement satisfy your requirements: using the...
  16. Replies
    14
    Views
    99

    Re: Java Reflection API

    What does that mean? I thought there can only be one class in a .class file.

    How does the program access the .class files you want it to inspect?
  17. Replies
    14
    Views
    99

    Re: Java Reflection API

    For simplicity, assume the .class file's location is known. How will the code look at that file?
    Later the FileChooser class can be added to allow the user to find and select the .class file.
    ...
  18. Replies
    14
    Views
    99

    Re: Java Reflection API

    Where are the classes to be inspected located? How will your program access them?
  19. Replies
    14
    Views
    99

    Re: Java Reflection API

    Where are those located? How does the code access them?
    For example if you have a .class file, will the code read the bytes of the code and parse out its contents?

    Please edit your post and...
  20. Replies
    3
    Views
    90

    Re: Calculator Method issue

    You could write a method to prompt the user for the two int values and return those two values in a custom class you have written or return the values in a 2 dim int array.
  21. Replies
    14
    Views
    99

    Re: Java Reflection API

    Do you have an specific questions about how to use the classes and methods in the reflect package?
    What have you tried?

    Have you read this:...
  22. Re: Alarm clock won't tick, can't call method because of dereferencing??

    Please copy the full text of the error message and paste it here.
  23. Re: Do we really need abstract and interface in our project?

    It all depends on the program.

    Also posted here: https://coderanch.com/t/744388/java/abstract-interface-java-project
  24. Replies
    6
    Views
    154

    [SOLVED] Re: Sorting a Multi-Dimensional String array

    What are the data types for the operands? The > operator needs numeric like int or float.


    Does that mean you can not use it?

    Separating the fields of a row into separate arrays does not work...
  25. Replies
    5
    Views
    196

    Re: Image overlay and comparison code error.

    I would think the images need to be aligned so that objects in one image line up with the objects in the other image.
    Otherwise a pixel-by-pixel compare does not make sense.


    The posted code in...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4