Aniket S. Kulkarni

Ranch Hand
+ Follow
since Jun 15, 2011
Aniket S. likes ...
Android Firefox Browser Java
Merit badge: grant badges
For More
Cows and Likes
Total received
In last 30 days
Total given
Total received
Received in last 30 days
Total given
Given in last 30 days
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Aniket S. Kulkarni

@Mark Spritzler: Sir, These are not valid links. Please provide new valid links. Thanks!
Sorry! Campbell Ritchie.
I must call it as "Access Specifier" or "modifier". You are right.

If you mark two classes as public inside one java file then it results in an error as follows: error: class Movie is public, should be declared in a file named
public class Movie{
1 error

I want to say, you cannot mark more than one class as public inside one java file. Yes of course you can place Movie class in file, but in same file you can not mark it as public.

Don't misinterpret. Am I correct or not?
11 years ago
Hi Ryan Hickman!
When you post code in your post please use code button like this:


You can declare only one public class in one java file. Remove public specifier of Movie class.
When I ran the code on my machine after removing the public specifier of Movie class, it results in "Playing the movie".
11 years ago
I found the solution.
Open the AVD manager. Select the already created Virtual Device. Click on edit & add property GPU emulation set its value to yes.
Then restart the eclipse & run the app.


Hope this will help others too!
11 years ago
I am facing the same problem?
Did anyone find the answer?
Please help me!
11 years ago
Hi !
I am new to Android programming.
I have installed android sdk 20.0.3.
There was need for Android 4.0 (API 16), for that I have downloaded &
Now, where do I extract these files?

Thanks in advance!
11 years ago
Yes! You are right Campbell Ritchie.
All the instance variables are initialized to their default value.
Because of that it will print Value of a=0
11 years ago
static members are initialized before object of the class is created.
Each object of the class has separate copy of Instance variables but static variables are not depend on object instead they are class variables.


After compiling:
1 error will occur
non-static variable cannot be referenced from the static context

Because main() is static & it is loaded before any object of the class is created.
If you want to access instance variable a inside main() you have to create object of Example class.

11 years ago
Welcome!!! Agustin John Lacson to Coderanch.

There are 4 ways to retrieve any element from collection object:
1)Using for-each loop.
2)Using Iterator interface.
3)Using ListIterator interface.
4)Using Enumeration interface.

This links may help you:Iterator docs
Tutorial on Iterator
11 years ago
shivdhwaj pandey is explained it.
If the question has multiple correct answers & you only answer one of them correct then No mark will be given.
if the issue is resolved then click on the "Resolved" button.
Mohamed Sanaulla,
If your instance variable & method's variable(i.e.local to method) are same then this is used to avoid ambiguity.

you can find it with example
visit: Instance variable hiding instance variable hiding

I hope this will correct your doubt.
Using 'this' we can implement "Instance Variable Hiding"