Win a copy of Microservices Testing (Live Project) this week in the Spring forum!

Asha Lilliete

Greenhorn
+ Follow
since Jun 28, 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 Asha Lilliete

hi
i am using older ant version and i m trying to
upgrade it to 1.7
in the build.xml i ve used replacecopy
when i run the ant 1.7 script , i get a classcast exception
so i thought i should be using a higher version of xdoclet.jar
but it would be great if any one could tell me which version i should go for

thanks

this is the exception i got
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:115)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
Caused by: java.lang.ClassCastException: [Ljava.lang.String;
at xdoclet.ant.ReplaceCopy.doFileOperations(ReplaceCopy.java:81)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:534)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
... 11 more
--- Nested Exception ---
java.lang.ClassCastException: [Ljava.lang.String;
at xdoclet.ant.ReplaceCopy.doFileOperations(ReplaceCopy.java:81)
at org.apache.tools.ant.taskdefs.Copy.execute(Copy.java:534)
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)
14 years ago
Hi ,
could anyone tell y the following program fails to compile
also \u0048 and \u000a are the unicode for H and line feed respectively.
public class TechnoSample {
public static void main(String[] args) {
String s = "\u0048ello\u000aWorld!";
System.out.println(s);
}
}

where as this works
public class TechnoSample {
public static void main(String[] args) {
String s = "\u0048ello!";
System.out.println(s);
}
}
[ June 04, 2007: Message edited by: Barry Gaunt ]
Does Overloading exhibit Polymorphism behaviour?
If yes, can someone pls explain it
The given code is getting compiled
The thing is the label cannot be used.
All the local variables must be initialized.
where as a member variable neednt be, as it is initialiaed automatically.
If you initialize the byte b and compile it ,
the error should not occur.
The operators (=,!=) compare the objects to see if they refer to the same object.
But the equals method compares the value of the object.
equals() method is defined in the object class, hence inhereted by all the classes.However, it doesn't perform an intelligent comparison for user defined classes unless the class overrides equals method.
It has be defined in a meaningful way for most Java core classes like String,Integer

Hope this helps u