Click here to Skip to main content
15,887,361 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: The person who invented knock-knock jokes Pin
OriginalGriff27-Oct-22 20:02
mveOriginalGriff27-Oct-22 20:02 
GeneralRe: The person who invented knock-knock jokes Pin
OriginalGriff27-Oct-22 20:07
mveOriginalGriff27-Oct-22 20:07 
GeneralRe: The person who invented knock-knock jokes Pin
Daniel Pfeffer27-Oct-22 21:47
professionalDaniel Pfeffer27-Oct-22 21:47 
GeneralRe: The person who invented knock-knock jokes Pin
jmaida28-Oct-22 6:00
jmaida28-Oct-22 6:00 
GeneralRe: The person who invented knock-knock jokes Pin
Daniel Pfeffer27-Oct-22 21:45
professionalDaniel Pfeffer27-Oct-22 21:45 
GeneralRe: The person who invented knock-knock jokes Pin
obermd28-Oct-22 3:38
obermd28-Oct-22 3:38 
GeneralRe: The person who invented knock-knock jokes Pin
peterkmx28-Oct-22 8:20
professionalpeterkmx28-Oct-22 8:20 
GeneralOh! For the love of Kotlin! (Part 3) Pin
Cp-Coder27-Oct-22 4:23
Cp-Coder27-Oct-22 4:23 
Experts often refer to Kotlin as a "concise" language. Kotlin is closely related to Java, but look at this example of defining a class in the two languages:

In Kotlin the following single line will define a class:

class Person(var firstName: String, var lastName: String)

Note that the class definition does not seem to have a body. Kotlin will infer from the parameters what constructors, fields, etc. the class will need and provide them for you.

Now consider how you need to define the class in Java:

public class Person {

private String firstName;
private String lastName;

public Person(String firstName, String lastName) {
this.firstName = firstName;
this.lastName = lastName;
}

public String getFirstName() {
return this.firstName;
}

public void setFirstName(String firstName) {
this.firstName = firstName;
}

public String getLastName() {
return this.lastName;
}

public void setLastName(String lastName) {
this.lastName = lastName;
}
}

(Kotlin may provide different names for the getter and setter functions.)

Source:
Constructors and members · Kotlin Quick Reference[^]

This may explain why large organisations like Amazon, Google and some banks are moving to Kotlin for the creation of Android apps for devices like phones and tablets.

This does not mean that learning Kotlin is easy. Its very consiseness can make the code difficult to figure out for newcomers. But once you master it, you will never go back to Java for the developments of Android apps.
Get me coffee and no one gets hurt!


GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
Richard MacCutchan27-Oct-22 4:43
mveRichard MacCutchan27-Oct-22 4:43 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
David Crow27-Oct-22 5:10
David Crow27-Oct-22 5:10 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
0x01AA27-Oct-22 9:07
mve0x01AA27-Oct-22 9:07 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
David Crow27-Oct-22 9:21
David Crow27-Oct-22 9:21 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
Cp-Coder28-Oct-22 2:23
Cp-Coder28-Oct-22 2:23 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
Marc Clifton27-Oct-22 13:21
mvaMarc Clifton27-Oct-22 13:21 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
obermd28-Oct-22 3:41
obermd28-Oct-22 3:41 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
englebart27-Oct-22 17:30
professionalenglebart27-Oct-22 17:30 
GeneralRe: Oh! For the love of Kotlin! (Part 3) Pin
Dan Neely28-Oct-22 3:52
Dan Neely28-Oct-22 3:52 
JokeI just got back from the doctor's office... Pin
Sander Rossel27-Oct-22 0:56
professionalSander Rossel27-Oct-22 0:56 
JokeRe: I just got back from the doctor's office... Pin
Daniel Pfeffer27-Oct-22 1:29
professionalDaniel Pfeffer27-Oct-22 1:29 
GeneralRe: I just got back from the doctor's office... Pin
Choroid27-Oct-22 7:26
Choroid27-Oct-22 7:26 
PraiseRe: I just got back from the doctor's office... Pin
0x01AA27-Oct-22 9:59
mve0x01AA27-Oct-22 9:59 
GeneralRe: I just got back from the doctor's office... Pin
Sander Rossel27-Oct-22 21:09
professionalSander Rossel27-Oct-22 21:09 
GeneralRe: I just got back from the doctor's office... Pin
jmaida27-Oct-22 11:40
jmaida27-Oct-22 11:40 
GeneralWSO CCC OTD 2022-10-27 Pin
OriginalGriff26-Oct-22 21:45
mveOriginalGriff26-Oct-22 21:45 
GeneralRe: WSO CCC OTD 2022-10-27 Pin
DerekT-P26-Oct-22 23:16
professionalDerekT-P26-Oct-22 23:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.