Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 60
Like Tree1Likes

Thread: need program logic

  1. #21
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by JosAH View Post
    You haven't written this code yourself, have you? Otherwise you wouldn't have asked this. And please stop asking different questions all the time without properly discussing the replies to your previous questions.

    Jos
    i alreday reples to ur previous post, s ofcourse i am not written the code but i can explain whats happening,but my doubt is when we run the program how it exceution process occcurs(java is not line by line execution),first of all it goes to main method afterwards what happens

  2. #22
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    is there anyone know about java program execution

  3. #23
    Join Date
    Apr 2013
    Posts
    41
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by anonymouss View Post
    is there anyone know about java program execution
    do you mean like a
    Java Code:
    System.exit(0);
    ??

  4. #24
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by leeroijenkiins View Post
    do you mean like a
    Java Code:
    System.exit(0);
    ??
    see the previous post which i posted the program,how it exection works where it starts and how it ends the execution

  5. #25
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: need program logic

    Program logic starts quite thin at the beginning; it grows quite fat in the middle and ends rather thin again. It's more or less like a brontosaurus. This is my theorem which is mine.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  6. #26
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    947
    Rep Power
    2

  7. #27
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: need program logic

    So the OP copied that code from Rose India without even knowing what he did/copied ... sometimes I feel so tired ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  8. #28
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    947
    Rep Power
    2

    Default Re: need program logic

    You have to give him kudos for his persistence :)

  9. #29
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: need program logic

    Quote Originally Posted by SurfMan View Post
    You have to give him kudos for his persistence :)
    Hush, I'm banging my head against the wall now and I have to concentrate on that ...

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  10. #30
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by SurfMan View Post
    You have to give him kudos for his persistence :)
    is there any problem for you, yeah i just copied the code even i didnt mention its my code like that,here i came to this forum to learn and develop my self, i cant understand if i post the code and i raise some doubt means you have to clarify if you know about that otherwise just left it but your are spending time to search the coding where the user had been collected the code,is it your work to searching the sites

  11. #31
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by JosAH View Post
    So the OP copied that code from Rose India without even knowing what he did/copied ... sometimes I feel so tired ...

    kind regards,

    Jos
    ha without knowing i cant post blindly k ,i know the progam and what happens in the program,its a sorting program ie bubble sort,even i could tell you manually that is what happening in the for loops ok

    Quote Originally Posted by JosAH View Post
    Hush, I'm banging my head against the wall now and I have to concentrate on that ...

    kind regards,

    Jos
    ok go on no one can stop here

  12. #32
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: need program logic

    You'd better get to the point (whatever that is); first you ask a vague question about 'program logic' and you even got a couple of answers; you immediately went on asking about removing duplicates from a sequence and you ignored the answers but dumped a piece of unrelated code copied from Rose India (of all places) without referecence to the source of the code. And now you're arguing the replies by other posters. What is it that you want?

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  13. #33
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    need to change title as doubt about program logic and technical questions
    here i mention program logic means for example take if the program has for loop how its executing process i mean how it starts the loop and how it quits the loop and how it works?this is what i meant,and it also refere if we want to remove duplicates means we need a logic to execute code to remove duplicated so that is what i refered

  14. #34
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: need program logic

    Google for "Java tutorials" and you'll find the tutorials by Oracle; study them and you'll know everything about Java. Forget Rose India, it's crap.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  15. #35
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by JosAH View Post
    Google for "Java tutorials" and you'll find the tutorials by Oracle; study them and you'll know everything about Java. Forget Rose India, it's crap.

    Jos
    k ,but i know basics now,if you know how exceution starts from where to where in the above program,when we run the program means it checks the main method after that where it goes

  16. #36
    JosAH's Avatar
    JosAH is online now Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,528
    Blog Entries
    7
    Rep Power
    20

    Default Re: need program logic

    Quote Originally Posted by anonymouss View Post
    k ,but i know basics now,if you know how exceution starts from where to where in the above program,when we run the program means it checks the main method after that where it goes
    If you think reading that tutorial is a waste of time, don't read it; good luck with it, but don't be surprised if you're pointed to those tutorials again and again.

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  17. #37
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: need program logic

    Quote Originally Posted by anonymouss View Post
    k ,but i know basics now,if you know how exceution starts from where to where in the above program,when we run the program means it checks the main method after that where it goes
    How code executes is the basics.
    Where do you think the code goes?

    Give us your interpretation of how the code executes, which will at least give us an idea of where you are in terms of knowledge.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  18. #38
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by Tolls View Post
    How code executes is the basics.
    Where do you think the code goes?

    Give us your interpretation of how the code executes, which will at least give us an idea of where you are in terms of knowledge.
    i know basic which i meant for that is in previous post mods told google for java tutorial to learn basic,so that what i replied, as a interpreter i will tell upto my knowledge,class are loaded after that static variable and static method are loaded after main method then i had a doubts thats why i asked here with showing example also

  19. #39
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    12,014
    Rep Power
    20

    Default Re: need program logic

    But the code you showed had no static blocks, or static variables.
    All it had was a main() and anotherMethod().
    So it's no different than any other piece of code.
    It doesn't even instantiate anything except a single array by the looks of it.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  20. #40
    anonymouss is offline Member
    Join Date
    Apr 2013
    Posts
    26
    Rep Power
    0

    Default Re: need program logic

    Quote Originally Posted by Tolls View Post
    But the code you showed had no static blocks, or static variables.
    All it had was a main() and anotherMethod().
    So it's no different than any other piece of code.
    It doesn't even instantiate anything except a single array by the looks of it.
    yeah so as a interpreter how it executes ,first it goes to main method after that which line goes to execute if you provide with numbers its helpful and easily understandable ,for example after it loads class it goes to 3rd line then ?
    Java Code:
    public class Bubblesort
    {
        public static void main(String arsg[])
        {
            int i;
            int array[] = {12,5,4,85,18,1,3,10};
            System.out.println("Values Before the sort:\n");
            for(i = 0; i < array.length; i++)
             
            System.out.print( array[i]+"  ");
            System.out.println();
             
            int n=array.length;
            bubble_srt(array, array.length);
             
            System.out.print("Values after the sort:\n");
            for(i = 0; i <array.length; i++)
            System.out.print(array[i]+"  ");
            System.out.println();
            System.out.println("PAUSE");
        }
     
        public static void bubble_srt( int a[], int n )
         
        {
            int i, j,t=0;
            for(i = 0; i < a.length; i++)
            {
                for(j = 1; j < (a.length-i); j++)
                {
                    if(a[j-1] > a[j])
                    {
                        t = a[j-1];
                        a[j-1]=a[j];
                        a[j]=t;
                    }
                }
            }
         }
    }
    Last edited by anonymouss; 05-01-2013 at 03:40 PM.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. Replies: 11
    Last Post: 02-01-2013, 11:47 PM
  2. how is the logic this program???
    By riris in forum New To Java
    Replies: 4
    Last Post: 03-16-2012, 05:38 PM
  3. Need help on this program logic
    By cotemaria in forum New To Java
    Replies: 1
    Last Post: 11-12-2011, 09:14 PM
  4. need help in merging GUI and logic main program
    By lavender88 in forum NetBeans
    Replies: 2
    Last Post: 04-02-2011, 01:28 PM
  5. Separating program logic and GUI
    By loopingman in forum AWT / Swing
    Replies: 0
    Last Post: 12-08-2008, 02:46 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
  •