CS Electrical And Electronics
@cselectricalandelectronics

How to combine two strings in Java?

All QuestionsCategory: JavaHow to combine two strings in Java?
chetan shidling asked 4 years ago

I need short information.

1 Answers
chetan shidling answered 4 years ago

Use this code.
 

public class Chetan {
  public static void main(String[] args) {
    String firstName = "Chetan ";
    String lastName = "Shidling";
    String fullName = firstName + lastName;
    System.out.println(fullName);  
  }
}