Skip to content

Instantly share code, notes, and snippets.

@rahulmalhotra
Created November 26, 2017 03:30
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/63b876df0f5abebbf0ef9e9e1a3a6744 to your computer and use it in GitHub Desktop.
Save rahulmalhotra/63b876df0f5abebbf0ef9e9e1a3a6744 to your computer and use it in GitHub Desktop.
Program to create 1-D Array in Java
public class array {
public static void main(String[] args) {
int months[]={1,2,3,4,5,6,7,8,9,10,11,12};
System.out.println("Months - ");
for(int i=0;i<12;i++)
System.out.println(months[i]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment