This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Anonymous array  RSS feed

 
Jigar Patel
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is difference betwween

int[] t = new int[]{1,2,3};
int[] t={1,2,3}
 
fred rosenberger
lowercase baba
Bartender
Posts: 12542
48
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
nothing. The second is a shorthand the folks who implemented the compiler allowed you.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!