Results 1 to 2 of 2
  1. #1
    lalithalydia is offline Member
    Join Date
    Jan 2008
    Posts
    3
    Rep Power
    0

    Default Error

    Dear friends,
    below is my coding, it shoots error. can you pls help me to identify my error line

    if(code>1);
    a=b+c
    else
    a=0

    my another coding is

    int m;
    int x[]=int[10];
    int[.]y=int[11];
    for(m=1;m<10;++m)
    x(m)=y[m]=m;
    x=y=new int[20];
    for(m=0;m<10;++m)

    pls find me where is error

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by lalithalydia View Post
    if(code>1);
    Remove ; at the end

    Quote Originally Posted by lalithalydia View Post
    a=b+c
    a=0

    Those type of code lines are called statements. You have to terminate them with ; mark.


    Quote Originally Posted by lalithalydia View Post
    x(m)=y[m]=m;

    Here also you have an error. Conflict with () and []. Can you see that.

    The above errors what I have seen directly on your code. Haven't compiled. Change them and check.

Similar Threads

  1. Welcome to our new forum: Forum Lobby
    By JavaForums in forum Forum Lobby
    Replies: 18
    Last Post: 02-07-2008, 05:40 AM
  2. Move to forum 'New To Java'
    By jvasilj1 in forum New To Java
    Replies: 2
    Last Post: 02-02-2008, 08:22 AM
  3. Move to correct forum
    By JavaJunkie1983 in forum Introductions
    Replies: 7
    Last Post: 01-23-2008, 03:04 AM
  4. Move to correct forum...
    By Winarto in forum Introductions
    Replies: 3
    Last Post: 01-18-2008, 03:00 AM
  5. New To Java Forum
    By nani5swamy in forum Introductions
    Replies: 3
    Last Post: 01-04-2008, 03:54 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •