How to define object array in java? -


in c# can write below code;

object[] params = new object[4] { "a", 10, "c", true}; 

what java notation of above code?

object[] param = new object[]{ obj0, obj1, obj2, ..., objx }; 

or

object[] param = { obj0, obj1, obj2, ..., objx}; 

or

object[] param = new object[x+1]; param[0] = obj0 ; ... param[x] = objx ; 

Comments

Popular posts from this blog

android - Inheriting from Theme.AppCompat* -

broadcastreceiver - android BOOT_COMPLETED not received if not activity intent-filter -

basic authentication with http post params android -