This week's book giveaway is in the Reactive Progamming forum.
We're giving away four copies of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams and have Adam Davis on-line!
See this thread for details.
Win a copy of Reactive Streams in Java: Concurrency with RxJava, Reactor, and Akka Streams this week in the Reactive Progamming forum!

Deepa sivasankar

Ranch Hand
+ Follow
since Jul 22, 2003
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
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Deepa sivasankar

You can use the java disassembler and see the assembly instructions. But i am not sure for getting the source.
Herbert,
Great explanation... I feel the same.
Thanks
Please correct me
When this is called,
Severn s = new Severn();

Severn() gets executed.
compiler implicitly calls the super class constrctor.
Base()
In Base(), amethod() calls the amethod() in Severn because it's calling the method of the current object referred by "this" ?
That's why Severn is getting printed instead of Base printed.
Can java experts clarify this for me?.
Thanks
Deepa

You can't create object of a static class. i.e you can't have an instance. For simplicity, let's take a static variable as an example.
public class example {
static int variable1 = 10;
}
In the memory it will retain its value till the end of the application. At some other point in code if you change
variable1 = 20;
then it will have a new value of 20 and it is retained. Moreover, you can access this variable example.variable1 and it doesn't need any instance.
Hope this helps..
deepa
Satya,
I agree with you.
// System.out.println("Outer " + Outer.this.x);
The above syntax is useful if you have the same variable x within the inner class and you want to use the variable in the Outer class.
Thanks
One small doubt. We can create an instance of the outer class from the inner class right.
From Sandra reply , quoted below.
"In your Summary, the second point should say,'local class in a static method cannot access outer class instance variables,since there is no this reference. So only static class variables
and final method variables."
We can access the instance variables of enclosing class through its instance.
Look at the code below.
public class Outer {
private int x = 5;
static int y = 6;
public static void main(String args[]) {
System.out.println("in main");
Outer.method();
System.out.println("end of main");
}
static void method() {
class inner {
inner() {
System.out.println(new Outer().x);
}
}
new inner();
}
}
Produces the output
in main
5
end of main
Any comments.
Thanks
Deepa
Thanks Maha for a great explanation. I appreciate it.
Thanks ajith, again.
Can someone shed some light on this encoding part?. Please...
thanks for ur help
Can someone elaborate on this?please
Maha anna,
Can you please explain this objective ?
Distinguish between conditions under which platform default encoding conversion should be used and conditions under which a specific conversion should be used.
Can you tell me when you use the sockets what kind of encoding should be used?.
My answer is that we should use ascii 8 bit stream datatype and not character 16 bit unicoding.
I would appreciate your help.
Thanks
Deepa
Thanks ajith.
i have one more objective .
"Describe the permanent effects on the file system of constructing and using FileInputStream, FileOutputStream, and RandomAccessFile objects"
Can anyone explain or point me to the right place??
I found this in the sun objective. Can someone explain to me ?. I appreciate your help.
"Destinguish between conditions under which platform default encoding conversion should be used and conditions under which a specific conversion should be used. "
Thanks
Deepa
Friends,
Please clarify this concept.
You cannot create use new keyword with an interface.
i.e ActionListener al = new ActionListener();
If that is the case , is this allowed if it is an anonymous inner class???. Is this a special case where it's allowed new with an interface.
But i agree the foll. statement as a valid one.
WindowListener wl = new WindowAdapter();
You can assign the reference to an interface of the newly created windowadapter object.
I would appreciate if maha can clarify this for us??
Thanks
deepa