Skip to content

Instantly share code, notes, and snippets.

@rahulmalhotra
Last active November 26, 2017 03:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rahulmalhotra/afe2daccf6aa401fa5f67896d1bb5fa5 to your computer and use it in GitHub Desktop.
Save rahulmalhotra/afe2daccf6aa401fa5f67896d1bb5fa5 to your computer and use it in GitHub Desktop.
Program to make 1-D Array using new keyword in java
public class array {
public static void main(String[] args) {
String name[]=new String[3];
name[0]="Rahul ";
name[1]="Malhotra ";
name[2]="is a coder";
System.out.println(name[0]+name[1]+name[2]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment