View Poll Results: is this question sensible???

Voters
4. You may not vote on this poll
  • silly

    0 0%
  • good

    3 75.00%
  • excellent

    1 25.00%
Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 54
  1. #21
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Have you ever bought anything that you have then had to assemble? There is a pice of paper (or small book) that comes with the product that tells you how to assemble them, right? Well, think of Java this way then, your Java file is that little book with the instructions, and the class files are the assembled product. It is perfectly legal to place the instructions for three different (but hopefully related) products in the same book, right? Well, that's what you've done here, but each of those instructions (the class definitions) refer to their own individual product (the compiled class file).

  2. #22
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    I already answered this for you in your other thread.

    You have three class definitions (not classes) in a single java (i.e. source code) file. When this file is compiled, each of the compiled classes created from those class definitions, as they are compiled, will be placed into their own class (i.e. byte code/compiled/binary/however you want to refer to them) file. Therefore, one java source code file and three compiled binary class files.
    for ex---
    my file name is case.java
    my class names are cat, CAT, a.
    after compiling i see only case.class file created in same directory,,, wer are the other class file present as u said,

  3. #23
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Read your other thread, again. You need to find a tutor, for at least a short while.

  4. #24
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Maybe, if you posted your complete java file, provide the full directory name (full path included) it is located in, and provide the exact and complete command you used to compile it, and provide the full directory name (full path included) of the current working directory when you executed that command, we should be able to tell you where the other two class files are, but that doesn't mean you will understand why they are there.

    As I said, find a tutor.

  5. #25
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    are u a tutor

  6. #26
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    I am (or have been at different times in the past), but I can almost guarantee that I am

    1. No where even remotely close to your home.

    and

    2. That you would almost definately not be able to afford what I now charge.

  7. #27
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    Maybe, if you posted your complete java file, provide the full directory name (full path included) it is located in, and provide the exact and complete command you used to compile it, and provide the full directory name (full path included) of the current working directory when you executed that command, we should be able to tell you where the other two class files are, but that doesn't mean you will understand why they are there.

    As I said, find a tutor.
    sorry sir,,,, found it,as u said, if we seeing in command prompt, its there,,,,,,


    dont get angry,,, im new to java,,,,feel free to explain us,,,

  8. #28
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    I am (or have been at different times in the past), but I can almost guarantee that I am

    1. No where even remotely close to your home.

    and

    2. That you would almost definately not be able to afford what I now charge.
    y explaining simple question with more complex answers,,,, coollll

  9. #29
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    I am (or have been at different times in the past), but I can almost guarantee that I am

    1. No where even remotely close to your home.

    and

    2. That you would almost definately not be able to afford what I now charge.
    but u r interesting

  10. #30
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by j2vdk View Post
    y explaining simple question with more complex answers,,,, coollll
    how much u need as a tutor??? how can u say tat i cant afford u de charge???


    y not replying

  11. #31
    masijade is offline Senior Member
    Join Date
    Jun 2008
    Posts
    2,571
    Rep Power
    9

    Default

    Tell me what you'd be willing to pay. And don't forget, that travel expenses get billed separately.

  12. #32
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,308
    Rep Power
    25

    Default

    On windows: For a test, create two files: c.txt and C.txt in two separate folders.
    Then copy one file from one folder to the other folder.
    How many files are now in the other folder?

  13. #33
    serjant's Avatar
    serjant is offline Senior Member
    Join Date
    Jun 2008
    Location
    Ukraine,Zaporozhye
    Posts
    487
    Rep Power
    7

    Default

    I tried in linux to copy two files c.txt and C.txt from ext3 file system to FAT32 and it gave me c.txt only on FAT32,and to copy those file from different folders from FAT32 file system to ext3 in one folder,it gave me two files.Look at the screenshots:

    The two files in the same folder on ext3 file system:



    Copying the two files to usb stick which has FAT32 file system:




    Then i created the workplace on usb stick and tried to compile the java project,and had the error,and from the workplace on ext3 file system it compiled and ran flawlessly.

    So make the conclusions.
    Last edited by serjant; 08-30-2008 at 11:42 PM.

  14. #34
    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 j2vdk View Post
    i wont use normally,, but i was questioned like this,,, cant find solution... so please tell the reason for runtime error
    I don't know what you are talking about. already answered to this. Don't use same class name in naming conventions. When you compile one class file is overwrite from the other and and runtime one of the file can't find. You said that you don't get any compile errors. But most of new Java IDEs warn about that in compile time. In my NetBeans 6.1 it works.

    Keep in mind, platform independent and case-sensitivity are completely two different things. You may identify it first to comment in others replay.

  15. #35
    j2vdk's Avatar
    j2vdk is offline Member
    Join Date
    Aug 2008
    Posts
    45
    Rep Power
    0

    Default

    Quote Originally Posted by masijade View Post
    Tell me what you'd be willing to pay. And don't forget, that travel expenses get billed separately.
    if u r de tutor , u should tell me,,,,,

  16. #36
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    6

    Default

    I would say, C extends c, so c is initialized first, so it first prints c. After that C is initialized and it prints bc.

    This basically is it, I guess.

  17. #37
    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 Supamagier View Post
    I would say, C extends c, so c is initialized first, so it first prints c. After that C is initialized and it prints bc.

    This basically is it, I guess.


    I don't think so. As you said when instantiate one after the other, one file is overwrite and we get the incorrect result. Are you talking about different class files or in the same file?

  18. #38
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    6

    Default

    I'm talking about different class files here.

    As far as I know; when a class extends an other class, the class you extend will have it's init() called, before anything else is done. It's like you use
    Java Code:
    new Test();
    A new Test will be constructed before the 'progress continues'.
    I die a little on the inside...
    Every time I get shot.

  19. #39
    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 Supamagier View Post
    I'm talking about different class files here.

    As far as I know; when a class extends an other class, the class you extend will have it's init() called, before anything else is done. It's like you use
    Java Code:
    new Test();
    A new Test will be constructed before the 'progress continues'.

    Yes, that's true. But the issue here is, at run time one of the class is missing, as our thread starter says. Can you prove that it's not happened in the way you explain here?

  20. #40
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    6

    Default

    Nope, not right now anyways. Can you? Is it possible?
    I die a little on the inside...
    Every time I get shot.

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. String Title case
    By bugger in forum New To Java
    Replies: 6
    Last Post: 01-31-2012, 01:21 PM
  2. MySQL Case Sensitive Problem
    By techissue2008 in forum JDBC
    Replies: 1
    Last Post: 06-10-2008, 06:23 AM
  3. Case Based Reasoning
    By kbyrne in forum Advanced Java
    Replies: 4
    Last Post: 04-12-2008, 08:51 PM
  4. problem with operator in case
    By jimJohnson in forum New To Java
    Replies: 2
    Last Post: 03-21-2008, 08:22 PM
  5. Can I set a range in case statement?
    By christina in forum New To Java
    Replies: 1
    Last Post: 07-25-2007, 08:41 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
  •