constant tag

4 questions


1 answers
130 views
0
What is the best way to implement constants in Java?

public class MaxSeconds { public static final int MAX_SECONDS = 25;}I saw an example like this. Assuming that you can make a constant class with only a constant, you declared it a static final like th...

2 years ago

1 answers
160 views
0
What is the difference between "chars[]" and "char*s"?

In C, when saving a string,There are two ways together. What's the difference between these two?I want to know what actually happens on memory when I compile, when I run.

2 years ago

1 answers
110 views
0
What does the constant 0.0039215689 do in the graphic header?

0.0039215689 is used a lot in the graphic header fileWhat's the point?Why do you always write 0.0039215689 without setting it to const?If you look at the first code on Google (here )void RDP_G_SETFOGC...


1 answers
102 views
0
[Java Basics] Question about using the final constant in the switch case statement.

I know that if-else statements are more efficient, but it is a homework that needs to be solved with a switch case.//final int myS = 'A' works, but it is entered by the scanner method and the case exp...

2 years ago

© 2024 OneMinuteCode. All rights reserved.