why it is incorrect expression?

Discussion in 'Java' started by gearss8888@gmail.com, Mar 4, 2012.

  1. Guest

    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");

    }
    }
    , Mar 4, 2012
    #1
    1. Advertising

  2. markspace Guest

    On 3/3/2012 8:31 PM, 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];"
    markspace, Mar 4, 2012
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andy
    Replies:
    4
    Views:
    301
    Andreas Andersen
    Feb 2, 2005
  2. Curzio Basso
    Replies:
    4
    Views:
    344
    Tim Hochberg
    Mar 4, 2004
  3. Mr. SweatyFinger

    why why why why why

    Mr. SweatyFinger, Nov 28, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    855
    Mark Rae
    Dec 21, 2006
  4. Mr. SweatyFinger
    Replies:
    2
    Views:
    1,744
    Smokey Grindel
    Dec 2, 2006
  5. Replies:
    6
    Views:
    307
Loading...

Share This Page