What are some of the equivalent statements of C# in Java?
-
I know C# a little and I have an programming exam which is in Java, tomorrow. Therefore I'll be glad if you tell me what some of the equivalent statements of C# in Java mentioned below are. Thanks for your help. Some of C# statements: *** Console.WriteLine(string str) *** Console.Write(string str) *** Console.ReadLine(string str) *** // Inheritance *** // Polymorphism *** // LinkedList *** // Interface *** // Overloading Operators/Functions *** // Properties And any other simple differences which you think I have to know. The exam itself is not a full-coding-type exam but it's not completely free of codes! Thanks again :)
-
I know C# a little and I have an programming exam which is in Java, tomorrow. Therefore I'll be glad if you tell me what some of the equivalent statements of C# in Java mentioned below are. Thanks for your help. Some of C# statements: *** Console.WriteLine(string str) *** Console.Write(string str) *** Console.ReadLine(string str) *** // Inheritance *** // Polymorphism *** // LinkedList *** // Interface *** // Overloading Operators/Functions *** // Properties And any other simple differences which you think I have to know. The exam itself is not a full-coding-type exam but it's not completely free of codes! Thanks again :)
atoi_powered wrote:
I know C# a little and I have an programming exam which is in Java, tomorrow
Too late. Far, far too late.
// java code to write to stdout
System.out.println(Object);
//or
System.out.print(Object); // no line feed// reading you need to open a reader:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));String input = null;
try {
input = br.readLine();
} catch (IOException ioe) {
System.out.println(ioe);
}// Inheretance
class Child extends Parent {
// ...
}My advice is stay up all night and start reading. Fast!
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
-
I know C# a little and I have an programming exam which is in Java, tomorrow. Therefore I'll be glad if you tell me what some of the equivalent statements of C# in Java mentioned below are. Thanks for your help. Some of C# statements: *** Console.WriteLine(string str) *** Console.Write(string str) *** Console.ReadLine(string str) *** // Inheritance *** // Polymorphism *** // LinkedList *** // Interface *** // Overloading Operators/Functions *** // Properties And any other simple differences which you think I have to know. The exam itself is not a full-coding-type exam but it's not completely free of codes! Thanks again :)
I don't know whether you are a fast learner, but you could take a look at the Java Tutorials[^].
-
atoi_powered wrote:
I know C# a little and I have an programming exam which is in Java, tomorrow
Too late. Far, far too late.
// java code to write to stdout
System.out.println(Object);
//or
System.out.print(Object); // no line feed// reading you need to open a reader:
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));String input = null;
try {
input = br.readLine();
} catch (IOException ioe) {
System.out.println(ioe);
}// Inheretance
class Child extends Parent {
// ...
}My advice is stay up all night and start reading. Fast!
Panic, Chaos, Destruction. My work here is done. Drink. Get drunk. Fall over - P O'H OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
You're right but the exam is algorithmic and it doesn't depend on bunches of codes! I don't know why but the professor asked us to write the coding problems in Java. I think it will be fun, wish me luck :)
-
I know C# a little and I have an programming exam which is in Java, tomorrow. Therefore I'll be glad if you tell me what some of the equivalent statements of C# in Java mentioned below are. Thanks for your help. Some of C# statements: *** Console.WriteLine(string str) *** Console.Write(string str) *** Console.ReadLine(string str) *** // Inheritance *** // Polymorphism *** // LinkedList *** // Interface *** // Overloading Operators/Functions *** // Properties And any other simple differences which you think I have to know. The exam itself is not a full-coding-type exam but it's not completely free of codes! Thanks again :)
I have an programming exam which is in Java, tomorrow I can see what happens here[^] Good luck.
regards Torsten When I'm not working