Day Vide

Greenhorn
+ Follow
since Sep 02, 2017
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
1
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Day Vide

Hello guys,

I was wondering, if I was to make a gambling game in java. Would it be a good idea to use the Random class to generate random number for cards ?
How do you guys generate real random numbers for games like that, so that the numbers or cards wouldn't be detectable.

Thank you
5 years ago
Thank you very much for the reply,

when you say finals are created like this

I don't have to initialize it in the constructor or in any other method ?
6 years ago
Greetings everyone,

My teacher assigned me to do a program that :


Write an application to convert into hours, minutes, seconds, a time originally expressed in seconds. The only operations allowed are addition and subtraction. (3813 seconds become 1 hour, 3 min, 33 sec.).



I just wanted to know if I did it correctly.

Here is my code :
ConversionTemps.java


ConversionTempsFrame.java

Note : I just put a little part of the frame code

I just wanted to make sure I did as the teacher asked and maybe you guys can give me tips on my code or an easier way to do it.

Thank you everyone !



6 years ago
Great, thank you for your help guys !
6 years ago
Hello everyone,

I have a question. In my program I have some code to change a string to a integer but I keep getting errors in my program everytime the user enters a string without numbers or a string with numbers like this :
" 123" or "abc123".

How can I check if the string is numeric before converting it to an integer ?
Here is my code :



Thank you.


6 years ago
Greetings,

Is it ok to call methods in class constructors ?

Everytime I try calling one I get this warning 'overridable method call in constructor'.

If not, what would be the good way to do this ?

Thank you
6 years ago
Greetings,

I was wondering would it be possible to see methods source code.

For example the class Scanner.

6 years ago
Hello,

in a class diagram, what should be identified to build and organize a class in Java?

Would it be a Java class object ?
6 years ago
Hello,

what is the class of the SWING library that we mainly use to enter information entered by a user?

I was thinking maybe JTextField or JOptionPane.

Could you guys correct me and explain why the other wouldn't be it.

Thank you
6 years ago