This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Mastering Corda: Blockchain for Java Developers and have Jamiel Sheikh on-line!
See this thread for details.
Win a copy of Mastering Corda: Blockchain for Java Developers this week in the Cloud/Virtualization forum!

Roopa Chitradurga

Greenhorn
+ Follow
since Mar 17, 2006
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 Roopa Chitradurga

I'm preparing for 1.4.I have been practising java from couple months and hence more comfortable than 1.5.If there is no other distractions,then I should wrapp this up by june end.

Originally posted by bnkiran kumar:
Details sent must be accurate as it will be reflected in your
personal database.[/QB]



I don't know what he means by that.By the way who ever sent you could have sent from the official id.
I checked the Sun's website,it does'nt say anything about the website mentioned in your email(integral7).When I checked Sun refered to diff website .It is https://i7lp.integral7.com/durango/do/login?ownername=sun&channel=sun&basechannel=prometric

If you are waiting for your certificate,then acco.to sun's website it should arrive within 1 week.
I think you better call local Sun's office and verify this matter.


Hope this helps you.

Roopa
Thanks Keith.I will look into it.
Super class being abstract while subclass is concrete.

Any help?
Thanks,
Roopa
[ March 20, 2006: Message edited by: Roopa Chitradurga ]
If I declare super class in one package and sub-class in default package,will it compile?

I need help in this section.

Thanks,
Roopa
"1. What is the use of having constructor in abstract class? Any how we cant create instance on abstract class. so whats the use of constructor?"

The purpose of abstract class is to provide common information for the subclasses.The abstract classes cannot be instantiated.You will get a compile error.


"2. When we are not able to create instance of abstract class, whats the use of having concrete methods(fully coded) in abstarct class? How can we call them without an instance? "


An abstract class can have methods with full body apart and abstract method.
This is especially usefull when extending classes.Say,you have an super class Animal and sub-classes Dog,Cat,Cow etc.All the different type of animals have one thing comon.ie,sound.So the Animal class has methods to define these sub-classes and also a method called sound().Though this method does nothing.It is only used in subclasses and implemented.It is just declared in Animal class but not defined.

See the code below:

public abstract class Animal{
public abstract void sound();

private String type;

public Animal(String atype){
type=new String(atype);
}
public String toString(){
return "This is a "+ type;
}
}

public class Dog extends Animal{
public Dog(String aname){
super("Dog");
this.aname=aname;
}
public void sound(){
System.out.println("woof woof");
}
}

similarly you can do for cat,cow etc.

This is known as polymorphisim.The advantage is that the single method can behave differently,depending on the type of object it is called.


Thanks,
Roopa
Srirambhatla dileep kumar,
Try "Begining java 2" by Ivor Horton.It also covers jdk 1.2.


Thanks,
Roopa
Vidhya,
Iam also in the same situation as you are.I too just started to prepare for sjcp1.4.While reading each chapter,I take notes of all important points.This is little time consuming but it helps me alot in remembering the concepts very well and also my scores are improved by 80-90% in self test using this approach.and of course code work has to be done to understand the concepts.


Thanks,
Roopa