asked 38.6k views
3 votes
Public class Main {

public static void main(String[] args) {

String firstName = "John ";

String lastName = "Doe";

String fullName = firstName + lastName;

System.out.println(fullName);

}

}

From this example copy and paste code that when run would say your name. in javascript with my first name being Ryan and my last name being Smith

asked
User Fboes
by
8.3k points

2 Answers

3 votes
public class Main {

public static void main(String[] args) {

String firstName = "Ryan";

String lastName = "Smith";

String fullName = firstName + lastName;

System.out.println(fullName);

}
answered
User Radovan Kuka
by
7.8k points
3 votes

Answer:

const firstName = "Ryan ";

const lastName = "Smith";

const fullName = firstName + lastName;

console.log(fullName);

Step-by-step explanation:

answered
User Prmths
by
7.8k points