JAVA Questions
can someone pleaase answer what does .class mean in java.....What does it return...and which function it triggers??
Can we override that function....
Please answer m not getting an appropriate answer anywhere
Thanks in anticipation.........๐
Can we override that function....
Please answer m not getting an appropriate answer anywhere
Thanks in anticipation.........๐
Replies
-
PraveenKumar PurushothamanDude? What's your exact question...
See, Java contains two types of files. One is the source file, which ends in .java and the other is class files, which are compiled files, they end with .class ๐
Is this what you are asking about??? ๐ -
crazyroshanif u create a class named Test...and if you do s.o.p(Test.class), which function does it triggers??? got ma q? now please reply.
-
PraveenKumar PurushothamanAha... You got confused with the extension and stuff... See, there is nothing known to the program as Test.class ok? It is the output file. Its like you are asking in a C Program, when you create a class Test and if you give: ๐
cout<
It is not used inside the code at all!!! ๐ -
crazyroshanpublic class test
{
public static void main(String arg[])
{
System.out.println(test.class);
}
}
please try this ull understand what m asking......i have seen this used in a code.... -
PraveenKumar PurushothamanThis is not a valid code at all... Anyways, what do you wanna do?
-
crazyroshantry running it.
-
PraveenKumar PurushothamanOki... I will try... ๐
-
PraveenKumar PurushothamanIt shows
class test
-
sookie@crazyroshan
1. "class" is a literal in java language. Just like you have string literal say "Hello" representing an instance of class String. similarly "class" literal represents an instance of class "Class"
2. When you specify.class , then it returns the class name[the one defined by #-Link-Snipped-#] of the particular instance referred.
You are reading an archived discussion.
Related Posts
I need avctivation key for microsoft office 2010 professional plus.
PLEASE help me.
can you please tell me the code to interface a mobile phone with a microcontroller.. i need to send and recieve a sms usin pic 16F877A.. please tell me the...
OK! We do not want iPhone any more and we need a Android phone. If you say why we should have it, we say we just need it intead of...
Is GRE required for pursuing MS in U.K got confusing replies any comments???????๐