Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > why it is incorrect expression?

Reply
Thread Tools

why it is incorrect expression?

 
 
gearss8888@gmail.com
Guest
Posts: n/a
 
      03-04-2012
I donot know why the following program cannot work, it says "keysTocutBysections = {{}}" is incorrect expression. please help.



public class GetAllContent {
String address;
String[][] keysTocutBysections;
public String GetAllCont (String addr, String keyword) {
address = addr;
if (address.indexOf("9") != -1) {
keysTocutBysections = {{}};
}
return "0";
}
public static void main(String[] args) {
GetAllContent xx = new GetAllContent();
xx.GetAllCont("99", "0");

}
}
 
Reply With Quote
 
 
 
 
markspace
Guest
Posts: n/a
 
      03-04-2012
On 3/3/2012 8:31 PM, http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> I donot know why the following program cannot work, it says "keysTocutBysections = {{}}"
> is incorrect expression. please help.
> keysTocutBysections = {{}};



Ayup, it's incorrect. What do you want help with? What were you
expecting that statement to do?

For an empty double array it's "new String[0][0];"

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
why why why why why Mr. SweatyFinger ASP .Net 4 12-21-2006 01:15 PM
findcontrol("PlaceHolderPrice") why why why why why why why why why why why Mr. SweatyFinger ASP .Net 2 12-02-2006 03:46 PM
why int ** test :: iptr = & test :: i ; is incorrect? ypjofficial@indiatimes.com C++ 6 02-09-2006 07:40 PM
why this program is incorrect? Andy C++ 4 02-02-2005 03:14 PM
[Numeric] why is Float32 incorrect for ufuncs? Curzio Basso Python 4 03-04-2004 09:15 PM



Advertisments