[Show all top banners]

thankeshwor
Replies to this thread:

More by thankeshwor
What people are reading
Subscribers
:: Subscribe
Back to: Kurakani General Refresh page to view new replies
 why JAVA is outdated ?
[VIEWED 6561 TIMES]
SAVE! for ease of future access.
Posted on 09-02-20 8:24 AM     Reply [Subscribe]
Login in to Rate this Post:     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;}
}
 
Posted on 09-02-20 4:36 PM     [Snapshot: 91]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Try using Lombok you can write same code like this in java:


@Getter
@Setter
public class MyClass {

private int myProperty;

}
 
Posted on 09-02-20 9:00 PM     [Snapshot: 184]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

LOL
Java and C# is similar
Python is different
 
Posted on 09-08-20 6:03 AM     [Snapshot: 454]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Relatively long syntax
 
Posted on 09-22-20 2:09 AM     [Snapshot: 670]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

I prefer Javaskript, much simpler objects
var myClass = {myproperty: "name-here" };
 
Posted on 09-22-20 3:58 PM     [Snapshot: 793]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Slight variation to one of the above responses:

@Data
public class MyClass {

private int myProperty;

}
 
Posted on 09-23-20 7:47 AM     [Snapshot: 941]     Reply [Subscribe]
Login in to Rate this Post:     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();
}

 
Posted on 09-23-20 6:37 PM     [Snapshot: 1003]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Try this:-

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


 
Posted on 09-23-20 7:48 PM     [Snapshot: 1030]     Reply [Subscribe]
Login in to Rate this Post:     0       ?    
 

Things now much more simpler than it used to be .
 


Please Log in! to be able to reply! If you don't have a login, please register here.

YOU CAN ALSO



IN ORDER TO POST!




Within last 60 days
Recommended Popular Threads Controvertial Threads
डीभी परेन भने खुसि हुनु होस् ! अमेरिकामाधेरै का श्रीमती अर्कैसँग पोइला गएका छन् !
शीर्षक जे पनि हुन सक्छ।
What are your first memories of when Nepal Television Began?
Sajha Poll: नेपालका सबैभन्दा आकर्षक महिला को हुन्?
Basnet or Basnyat ??
निगुरो थाहा छ ??
Nas and The Bokas: Coming to a Night Club near you
अमेरिकामा छोरा हराएको सूचना
TPS Re-registration case still pending ..
Breathe in. Breathe out.
nrn citizenship
ढ्याउ गर्दा दसैँको खसी गनाउच
Sajha has turned into MAGATs nest
Doctors dying suddenly or unexpectedly since the rollout of COVID-19 vaccines
अमेरिकामा बस्ने प्राय जस्तो नेपालीहरु सबै मध्यम बर्गीय अथवा माथि (higher than middle class)
Send Parcels from USA to Nepal & Worldwide.
Why is every youths leaving Nepal? Why are not youths entering politics and serving the country, starting business etc?
TPS Work Permit/How long your took?
Morning dharahara
कल्लाई मुर्ख भन्या ?
Nas and The Bokas: Coming to a Night Club near you
NOTE: The opinions here represent the opinions of the individual posters, and not of Sajha.com. It is not possible for sajha.com to monitor all the postings, since sajha.com merely seeks to provide a cyber location for discussing ideas and concerns related to Nepal and the Nepalis. Please send an email to admin@sajha.com using a valid email address if you want any posting to be considered for deletion. Your request will be handled on a one to one basis. Sajha.com is a service please don't abuse it. - Thanks.

Sajha.com Privacy Policy

Like us in Facebook!

↑ Back to Top
free counters