Search:

Type: Posts; User: shervan360

Search: Search took 0.10 seconds.

  1. Get value before execute printf in Java

    Hello,

    In my code, I have the below output. but I expected to execute the first printf then get two integers from the console.
    (Run in Netbeans - Widnows 10)



    import java.util.Scanner;
    ...
  2. Replies
    6
    Views
    668

    Re: I except show this FIRST - JAVA

    Win 10 and netbeans 13 (output window)
  3. Replies
    6
    Views
    668

    Re: I except show this FIRST - JAVA

    Thanks, but this is for me:

    10
    Enter N:
    20
    30
    10 is NOT Prime!Enter A: Enter B:
    20 is NOT Prime!
    21 is NOT Prime!
    22 is NOT Prime!
  4. Replies
    6
    Views
    668

    I except show this FIRST - JAVA

    Hello,

    Could you please run this?
    I except show "Enter N:" but the program waiting to receive the number.




    import java.util.Scanner;
  5. Replies
    3
    Views
    560

    Re: Check String Pattern in Java

    My point is 71% from 100%

    We don't have failed examples.

    I attached the output and two conditions in question.

    https://i.ibb.co/9gmvHv8/Screenshot-2021-04-07-155804.jpg
    ...
  6. Replies
    3
    Views
    560

    Check String Pattern in Java

    Hello,

    First I get a number (numbers of string to check) then get the pattern.
    If the string contains the pattern, print Yes otherwise No.

    For example:
    4 quera102

    quEra0012
    qu0erraa12
  7. Replies
    5
    Views
    1,058

    Re: Decision making statements

    I don't have any hints.

    Write a program that receives two numbers X and Y from the input. without decision making determine how many of the following statements are true?

    x>=0
    x>y
    x !=0
    ...
  8. Replies
    5
    Views
    1,058

    Re: Decision making statements

    Thank you,

    Decision Making in Java are if , if..else, Nested if, if-else-if , switch
  9. Replies
    5
    Views
    1,058

    Decision making statements

    Hello,

    I want to check how many of the following statements are true? But I should do this without "decision making statements".

    x>=0
    x>y
    x !=0


    Thanks
  10. Replies
    3
    Views
    614

    Re: Fetch string in JAVA

    Thank you, sorry my English language is bad.

    I did not get you.

    I am learning JAVA language.
  11. Replies
    3
    Views
    614

    Fetch string in JAVA

    Hello,

    I would like to check a string contains "hello" or not?

    In the following string if we remove some characters we have "hello".

    ahhellllloou

    sdfhwesflrfgvloouhhlh
  12. Re: Store One String with Two Integer in JAVA MAP

    Great idea.
  13. Store One String with Two Integer in JAVA MAP

    Hello,

    I want to store insurance resellers in Java Map.
    Resellers have Phone, Reseller Code, and name. How can I store these in JAVA Map?

    for example:

    824154 - 012 , Ohio

    695541 - 015 ...
  14. Replies
    9
    Views
    1,479

    Re: Convert Enum to String in JAVA

    Thanks, I should use an enum.
  15. Replies
    9
    Views
    1,479

    Re: Convert Enum to String in JAVA

    Thank you for your answer.

    incompatible types: We cannot be converted to String ( case Week.Shanbeh:)
  16. Replies
    9
    Views
    1,479

    Re: Convert Enum to String in JAVA

    incompatible types: We cannot be converted to String
  17. Replies
    9
    Views
    1,479

    Convert Enum to String in JAVA

    Hello,

    How can I fix this? Complier tells me we should convert the enum to String.





    package newpackage;
  18. Replies
    2
    Views
    1,189

    Enable attachment in forum

    Hello,

    Please enable a photo attachment for this forum.
    For diagnostics we need insert our result but we cannot attach a photo here.
  19. Replies
    1
    Views
    2,106

    getX and getY in Visual Studio Code

    Hello,

    In the below code I expected frame.getX() be 300 and frame.getY() be 200.
    But in output frame.getX() be 200 and frame.getY() be 300.





    import java.lang.*;
  20. Replies
    1
    Views
    833

    Decomplie .class file

    Hello,

    I wrote my program in notepad (Hello World!) and ran my program with cmd in Windows. After compile now I have .class file.
    How can I decompile .class file and see inside the file?

    Thanks
  21. Replies
    3
    Views
    611

    Re: Underflow in Byte

    Thank you for your answer, but I didn't understand well.
    Could you please more explain about it?

    The sign bit for the low order byte is 1 making it negative.
    Casting it to a byte throws away...
  22. Replies
    3
    Views
    611

    Underflow in Byte

    Hello,

    In the below code, we have underflow or overflow?
    Byte in java is 1 byte. It means the capacity of a byte is 0-255.
    400 - 256 (0 to 127 and -1 to -127). I expected we have 144. But we...
Results 1 to 22 of 23