Vishnu Khera

Greenhorn
+ Follow
since Nov 29, 2008
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
11
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Vishnu Khera

Campbell thanks for the clarification

It was indeed a poor choice of naming my class as Super, but the reason for naming it so was the length of the program I wanted to compile. It was a small 10 line program.

Yes, its a good tip because I was getting a strange compile time error in the same program

I understand if there were any, it would be class Super and not class Super()

Probably waaay too excited to post questions on this forum and get suuuper quick replies


BIG THANKS TO ALL OF YOU
11 years ago
Matthew, thanks for your response

Very true, it would be a poor choice of a class name. I searched for 'Super()' in google and Java API but could not find any class by this name
11 years ago
Harshvardhan thanks for your response

Oops... big goof up In elaborating my question properly I answered my own question
11 years ago
I was trying out some code and came across unexpected behavior as and referenced my user defined class to 'new Super()'. Is there any predefined class in Java API by the name Super()?
11 years ago
Thanks for your response Mala
Seetharaman I looove campfire stories Liked the Pass-by-value Please story

Thanks for sharing the link and for your response

Downloaded JD-GIU (a java decompiler) and decompiled the following code :


FOUND THIS :



Now my question is - is there some specification about how class files would be named once we define inner classes - like it shows $ as a seperator; and $1 as a seperator for local classes?


The above code is from a book. I'm unable to understand what the author means by " In the non-static method, the reference to the instance of the enclosing context is passed implicitly in the constructor call of the non-static local class at (6). "
You can select the purchase voucher from Oracle and get the voucher for Rs. 8014.
You might get a better deal at Pearson VUE website. You have register with them anyway. The cost of the exam for India is approximately $150 which is 8152.50 Rs. as of this moment.
Hello Sahil,

You can also purchase vouchers from Pearson VUE. Here is the link where you can view all your purchase options for 'Oracle Certified Professional, Java SE 6 Programmer'

Exam voucher purchase options
Joanne, thanks for your answer . I understand what -cp switch is for and do realize javac is not meant to compile complex projects. Campbell, thanks for your advise. I've changed user PATH and also set the system PATH to reflect JDK bin folder as the first statement.
11 years ago

I'm sorry . The screen shot says:

C:\Users\vk>echo %Path%
C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files
\Del 1\DW WLAN Card;C:\Program Files\Java\jdk1.6.0_38\bin

C:\Users\vk>


These are the environment variables for 'Path'
11 years ago
-cp path or -classpath path
Specify where to find user class files, and (optionally) annotation processors and source files. This classpath overrides the user class path in the CLASSPATH environment variable. If neither CLASSPATH, -cp nor -classpath is specified, the user class path consists of the current directory. See Setting the Class Path for more details.
If the -sourcepath option is not specified, the user class path is also searched for source files.

If the -processorpath option is not specified, the classpath is also searched for annotation processors.

As a special convenience, a class path element containing a basename of * is considered equivalent to specifying a list of all the files in the directory with the extension .jar or .JAR.

For example, if directory foo contains a.jar and b.JAR, then the class path element foo/* is expanded to A.jar:b.JAR, except that the order of jar files is unspecified. All jar files in the specified directory, even hidden ones, are included in the list. A classpath entry consisting simply of * expands to a list of all the jar files in the current directory. The CLASSPATH environment variable, where defined, will be similarly expanded. Note: Depending of the configuration of your command line environment, you may have to quote the wild card character, for example, javac -cp "*.jar" MyClass.java.

From Oracle - javac

And Java Tutorials

These links do not explain why any random garbage is required after -cp switch for javac to work properly. (I've mentioned it in a call out bubble - in previously posted images - for your reference)
11 years ago