This question already has answers here:
goto keyword in java [duplicate]
Why const keyword is not used in Java? [duplicate]
(4 answers)
Closed 9 years ago.
If goto and const keywords are not used in java then why java list them in the java keyword list.
They are reserved for future use, only not yet in use. They might have use in a future version of Java.
Related
This question already has answers here:
C# getting its own class name
(11 answers)
Closed 7 years ago.
I am trying to rewrite Java code to C# and I am facing the problem that C# has not got this Java method. Can you please give me the C#'s equivalent of this method or some other way to get the class name.
you can do it like this:
typeof(ClassName).Name
This question already has answers here:
What do 3 dots next to a parameter type mean in Java?
(9 answers)
Closed 7 years ago.
I'm following a java tutorial named "Java Swing first programs" and I noticed something that troubles me. At one point, there's a function written like this:
private void createLayout(JComponent... arg)
I was wandering why there was a ... and what those it do?
The tutorial: http://zetcode.com/tutorials/javaswingtutorial/firstprograms/
See the documentation for Java varargs.
This question already has answers here:
Different behaviour of java bytecode
(6 answers)
Closed 7 years ago.
Why do we have the iconst_* instructions?
Why would I ever want to use these instead of bipush?
I found this StackOverflow question when searching but it does not properly answer my question.
Because a bipush instruction takes two bytes in the bytecode, and an iconst_* instruction takes one byte.
This question already has answers here:
What are "connecting characters" in Java identifiers?
(7 answers)
Closed 9 years ago.
I have some doubt ,i want to know that is int π; is a valid syntax in Java Or Not because Java support UNICODE so according to me it can be valid but I want to make sure
int π; is perfectly valid - as you say Java supports unicode so anything not reserved is fair game for identifiers.
This question already has answers here:
Closed 10 years ago.
Possible Duplicate:
What is the Java equivalent of Objective-C's NSDictionary?
I've seen other answers but they seem to squabble over each other in terms of response.
I need to translate some Objective-C and I am using NSDictionary a lot. What should I try to use in Java for this ?
The best Java equivalent is a Map implementation specifically HashMap.