Considering Objective C and Java are both Object Oriented Programming Languages, both have many similarities and differences. Following Table tries to compare these points.
Objective C | Java | Description |
---|---|---|
description | toString | When Object is sent for printing description method is called to show the contents. One can override this while defining class. |
NSObject | Object | In Objective C you can have class without inheriting NSObject. In Java you can not create any class without inheriting from Object class. |
NSString | String | String Class representation |
printf or NSLog |
System.out.println or Log |
Ways to print the output on output console or Log. |
Leave a Reply