I once translated a large Java app to C# and the steps I did was to rename the source files, run then through the compiler, and fix the problems that the compiler found. Some things, such as changing System.out.println to Console.WriteLine were easy to accomplish globally by a decent text editor. In one case (generation of an image in memory) I had to completely rewrite the code.
However, Looking at this code, I don't see anything that would be hard to translate to Java by hand. Or were you hoping for someone to do this for you?
the prob is when i converted this code to java is not working with the hardware,
especiallt the read tag function,
so do help me to convert read tag function in java
while reading from a keyboard we use readline() method, so what will be the inbuilt method to read from a hardware.
Please post the Java code you have so far. Does your code compile? If you run it, is there and exception? Is so, post the full exception stack trace. If there is no exception, please elaborate on what you mean by "not working with the hardware"
so what will be the inbuilt method to read from a hardware
Peter Johnson wrote:
I once translated a large Java app to C# and the steps I did was to rename the source files, run then through the compiler, and fix the problems that the compiler found. Some things, such as changing System.out.println to Console.WriteLine were easy to accomplish globally by a decent text editor. In one case (generation of an image in memory) I had to completely rewrite the code.
While I've never undertaken anything quite like this in a long time (I had to rewrite several projects written in VB 6 to C++ some years ago), it is nice to learn that C# and Java are so similar that translating takes no more than changing the file name extension, and make the tweaks suggested by the compiler. Cool.
"Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away." -- Antoine de Saint-Exupery