🔒 Locked
[java] can interface has data members?
Advertisement
Original Post
quote:
Original post by Chaoslab
From what I remember variables are fine in interfaces but have to be public static final .
already stated here....
quote:
Original post by mjacobsca
An interface cannot have data members, but it can have constant variables. This makes interfaces well suited for enumeration type data (replacing the C++ enumeration).
To the vast majority of mankind, nothing is more agreeable than to escape the need for mental exertion... To most people, nothing is more troublesome than the effort of thinking.
Java has the best set of docs I have ever seen. One is the API docs, which is free. The other is The Java Tutorial, which the online version is free. Both can be found at Sun''s Java website.
---
Make it work.
Make it fast.
"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home
---
Make it work.
Make it fast.
"Commmmpuuuuterrrr.." --Scotty Star Trek IV:The Voyage Home
>> The docs aren''t exactly hard to find:
http://java.sun.com/docs/
Nothing''s hard to find if you have a direct link to it ^_^
>> There are plenty of books. Including some by Sun.
As I said before, nothings hard to find if you have a direct link to it.... it''s a simple question with a simple boolean-format answer. So why not ask on a forum instead of looking up in some stuffy text, right?
http://java.sun.com/docs/
Nothing''s hard to find if you have a direct link to it ^_^
>> There are plenty of books. Including some by Sun.
As I said before, nothings hard to find if you have a direct link to it.... it''s a simple question with a simple boolean-format answer. So why not ask on a forum instead of looking up in some stuffy text, right?
Alright guys, lay off of him.
It really pisses me off when someonw says RTFM to just about anything someone asks just because it is easy for the person who already knows the answer(whether it is easy to find or not). If the answer was that goddamn easy then just tell them instead of wasting the space to tell them to read the manual. It seems like a really hostile attitude to take towards someone who is obviously learning. There hasn''t been anything (besides life) that has cut into me learning a language more that one person saying RTFM and then everyone esle piping up and saying the same damn thing. I''m trying to get into a stupid argument here but if you have the time to post a stupid message like that then you have the time to post a stupid answer to a question you already know..
-Just when you think things are starting to look up, life grabs you by the jaws makes you open up wide and sh*ts down your throat.
It really pisses me off when someonw says RTFM to just about anything someone asks just because it is easy for the person who already knows the answer(whether it is easy to find or not). If the answer was that goddamn easy then just tell them instead of wasting the space to tell them to read the manual. It seems like a really hostile attitude to take towards someone who is obviously learning. There hasn''t been anything (besides life) that has cut into me learning a language more that one person saying RTFM and then everyone esle piping up and saying the same damn thing. I''m trying to get into a stupid argument here but if you have the time to post a stupid message like that then you have the time to post a stupid answer to a question you already know..
-Just when you think things are starting to look up, life grabs you by the jaws makes you open up wide and sh*ts down your throat.
what the hell is RTFM??
Read The F$#*! Manual.
-Neophyte
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GED d- s:+ a- C++$ UL++ P++ L++ E W+ N+ o K? w !O M--(+) V-- PS+
PE Y+ PGP t-- 5++ X+ R(+) rv+(++) b+++ DI+ D(+) G e+>++ h r--> y+
----- END GEEK CODE BLOCK-----
geekcode.com
-Neophyte
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GED d- s:+ a- C++$ UL++ P++ L++ E W+ N+ o K? w !O M--(+) V-- PS+
PE Y+ PGP t-- 5++ X+ R(+) rv+(++) b+++ DI+ D(+) G e+>++ h r--> y+
----- END GEEK CODE BLOCK-----
geekcode.com
quote:
Original post by Tac-Tics
When someone replies with a RTFM, it implies three things:
1) They understand the topic.
2) They''re easily aggrivated.
3) They are useless.
I''ve found that you learn a lot better by making an effort to find the answer, before asking people questions.
Lets see:
Thats exactly 9 typed words. This would have given a definite answer to the question, without having to wait for an answer on these boards. In contrast, the original post had 20 typed words, including a similar example.
What would have been faster, you think?
public interface MyInterface
{
public int Foo;
}
javac MyInterface.java
Thats exactly 9 typed words. This would have given a definite answer to the question, without having to wait for an answer on these boards. In contrast, the original post had 20 typed words, including a similar example.
What would have been faster, you think?
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement