why JAVA is outdated ? - Sajha Mobile
SAJHA MOBILE
why JAVA is outdated ?
Posts 9 · Viewed 6574 · Go to Last Post
thankeshwor
· Snapshot 0
Like · Likedby · 0

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;}
}
Hawagiri02
· Snapshot 91
Like · Liked by · 0
Try using Lombok you can write same code like this in java:


@Getter
@Setter
public class MyClass {

private int myProperty;

}
deepocean
· Snapshot 184
Like · Liked by · 0
LOL
Java and C# is similar
Python is different
thankeshwor
· Snapshot 454
Like · Liked by · 0
Relatively long syntax
AeX5m7zBC6jf4Z
· Snapshot 670
Like · Liked by · 0
I prefer Javaskript, much simpler objects
var myClass = {myproperty: "name-here" };
Nepali-IN-USA
· Snapshot 793
Like · Liked by · 0
Slight variation to one of the above responses:

@Data
public class MyClass {

private int myProperty;

}
tps2gc
· Snapshot 941
Like · Liked by · 0
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
· Snapshot 1003
Like · Liked by · 0
Try this:-

System.out.println("Hello World");

tps2gc
· Snapshot 1030
Like · Liked by · 0
Things now much more simpler than it used to be .
Please log in to reply to this post

You can also log in using your Facebook
View in Desktop
What people are reading
You might like these other discussions...
· Posts 1 · Viewed 9
· Posts 1 · Viewed 67
· Posts 5 · Viewed 1117
· Posts 1 · Viewed 72
· Posts 65 · Viewed 12199 · Likes 12
· Posts 1 · Viewed 139
· Posts 1 · Viewed 150
· Posts 1 · Viewed 220
· Posts 1 · Viewed 228
· Posts 1 · Viewed 299



Your Banner Here
Travel Partners
Travel House Nepal