← Back to Kurakani

why JAVA is outdated ?

Original Post

consider an example : public class MyClass { private int myProperty; public void setMyProperty(int value) { myProperty = value; } public int getMyProperty() { return myProperty; } } This is the same thing in C#: public class MyClass { public int MyProperty {get; set;} }

thankeshwor
Sep 2, 2020 8:24 AM · 18,220 views
8 Replies
Hawagiri02 Sep 2, 2020 4:36 PM
Try using Lombok you can write same code like this in java: @Getter @Setter public class MyClass { private int myProperty; }
deepocean Sep 2, 2020 9:00 PM
LOL Java and C# is similar Python is different
thankeshwor Sep 8, 2020 6:03 AM
Relatively long syntax
AeX5m7zBC6jf4Z Sep 22, 2020 2:09 AM
I prefer Javaskript, much simpler objects var myClass = {myproperty: "name-here" };
Nepali-IN-USA Sep 22, 2020 3:58 PM
Slight variation to one of the above responses: @Data public class MyClass { private int myProperty; }
tps2gc Sep 23, 2020 7:47 AM
to print ' hello world' yo have to go though a long syntax public static void main(String ... args) { System.out.println(randomString(-229985452)+' '+randomString(-147909649)); } public static String randomString(int seed) { Random rand = new Random(seed); StringBuilder sb = new StringBuilder(); for(int i=0;;i++) { int n = rand.nextInt(27); if (n == 0) break; sb.append((char) ('`' + n)); } return sb.t0script(); }
Hawagiri02 Sep 23, 2020 6:37 PM
Try this:- System.out.println("Hello World");
tps2gc Sep 23, 2020 7:48 PM
Things now much more simpler than it used to be .
Login to join the conversation.

You might be interested in...

Recent Classifieds View all
Upcoming Events View all
Service Providers View all
Ask Sajha AI Assistant