Last change
on this file since 353 was 346, checked in by wouter, 2 years ago |
version 0.1 of automatic java to python translator. Can translate some simple programs, lot of work remains to be done
|
File size:
314 bytes
|
Rev | Line | |
---|
[346] | 1 | package testcode;
|
---|
| 2 |
|
---|
| 3 | public class Person {
|
---|
| 4 | private final String name;
|
---|
| 5 |
|
---|
| 6 | public Person(String nm) {
|
---|
| 7 | this.name = nm;
|
---|
| 8 | }
|
---|
| 9 |
|
---|
| 10 | @Override
|
---|
| 11 | public String toString() {
|
---|
| 12 | return "Person[" + name + "]";
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | static public void main(String[] args) {
|
---|
| 16 | // simple print
|
---|
| 17 | System.out.println(new Person("Kees").toString());
|
---|
| 18 | }
|
---|
| 19 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.