No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
I am facing one problem in this type of pro-gramme where i use Class name as a Return type or pass object as an argument like here , i am getting same error(the class already defined), i am using eclipse. [CODE] ****class Test //showing error that the class Test already … |
|
[B]I m doing some problems regarding Return type in java.I m facing some problem . could any help plz.[/B] 1. class Plant { 2. String getName() { return "plant"; } 3. Plant getType() { return this; } [B]// what mean 'return this' here [/B] 4. } 5. class Flower extends … |
|
Actually i m doing constructor implementation.But i am new to java, can any tell what going on from line 11 to 14.I am having problem in understanding the bold in line 12 and line 13.Plz help..... 1. public class Animal { 2. String name; 3. Animal(String name) { 4. this.name … |
|
class Noise { void makeNoise() { System.out.println("This is Noise"); } class LessNoise extends Noise { void makeNoise() { System.out.println("This is LessNoise"); } void other() { System.out.println("This is a other method in Less Noise"); } } } class Casting { public static void main(String[] args) { ****** Noise [] a= {new … |