the in-built length variable
The length variable we see in arrays and everywhere is built in some inbuilt class of java.. but where? i tried to find it but cudnt get to it in any classses// tried searchin in java.lang package... can anyone tell me where the lenght variable is defined in java?
its urgent plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
http://www.amazon.com/Logitech-967557-0403-Cordless-Desktop-S510/dp/B000AY2L3U
> its urgent plzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz
Suffering cats, that's irritating.
1) We don't care if it's urgent. Your ineffectiveness at managing your time is of absolutely no interest to the forum. Perhaps I'm being too generous; it's of negative interest.
2) Stop raping the English language. If you can't spell "please" or post a simple question without depositing a slew of digital diarrhea, do us all a favor and refrain from posting here ever again.
~
well iam sorry i dint mean to hurt anyone's emtions here.. iam compeletly new here and dint know that it cud be such a offense... anyways if u cud pardom me this time... it wud be really nice if you could help me... Please can some one tell me where the lenght vairable is defined... in which class?
> Please can some one tell me where the lenght vairable is defined...
It's a built-in property of Java array types. It's defined by the language specification.
http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.7
Also, the words I believe you're struggling with are "you", "didn't", "would", and "could". "U" is just a letter, "dint" is a synonym for "dent", "cud" is something chewed on by a ruminant (e.g., a cow), and I have no idea what a "wud" is. If you expect clear answers, it makes sense to give clear questions.
~
Help! Help!Some termites ate a big dint out of my wud.
>If you expect clear answers, it makes sense to give clear questions.
Well sir thanks alot... not only will i learn about java here but i guess will also get better with my language and typing which was getting destroyed because of chatting sites... anyways i understand the importance of being proffesional as just finished my engineering and now looking for a job desparately... so i hope imporving not only with java but things like proper and clear writing will help my career... thank you sir and about the link you sent me...
I checked that and when from the src.zip folder i opened the java files.. i tired to find that length vairable.. i found a lenght variable in Array.java file in the lang package in reflect folder . but that vairable was a parameter so it that all.. i mean is that the same variable that springs up everywhere? i mean in the explanation you sent it was written the array file has a public final lenght field but it wasn't there...hope iam clear with what excatally i want to ask.. guidance regarding this will really help me become better and answer questions in the class i go to.. thank you!!!
here is the code i found in java file
public static Object newInstance(Class<?> componentType, int length)
throws NegativeArraySizeException {
return newArray(componentType, length);
}
Message was edited by:
power-extreme
You won't find it in the src.zip, since that's just Java source code.It's defined by the language spec and implemented by the compiler and JVM. For every array class, that member variable is present by definition.
jverda at 2007-7-12 20:56:28 >

well i was asked that question in my class where i learn java and they have asked me to find out and answer... so what should be my answer... that the lenght variable is defined for every array by specification... right? and this goes for java 6 too?
> well i was asked that question in my class where i
> learn java and they have asked me to find out and
> answer... so what should be my answer... that the
> lenght variable is defined for every array by
> specification... right? and this goes for java 6
> too?
Yup and yup.
Has been probably from the very beginning. At least since 1.1 for sure.
jverda at 2007-7-12 20:56:28 >

In particular, the variable exists in every array class because the JLS says it does.
jverda at 2007-7-12 20:56:28 >

ok thanks alot... i will try to discuss it with my teacher and try to find out more and if found something new will post here so that people can get some help... thanks alot everyone and this place is amazing/.... i wonder why didnt i join this before!!