How to combine two strings in Java?


Warning: Trying to access array offset on false in /home3/indiakep/public_html/wp-content/plugins/dw-question-answer/inc/Template.php on line 8
All QuestionsCategory: JavaHow to combine two strings in Java?
chetan shidling asked 5 years ago

I need short information.

1 Answers
chetan shidling answered 5 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);  
  }
}