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 3 of 3 FirstFirst 123
Results 41 to 54 of 54
  1. #41
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

  2. #42
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    7

    Default

    I'm not sure. :confused: I understand it's overwritten. It should work, but because Windows isn't case-sensitive an error is thrown, I think. ;)


    Okay, I decided to test it :) result:
    Attached Thumbnails Attached Thumbnails Is Java Case Sensitive???? Prove It-error_test1.jpg  
    Last edited by Supamagier; 08-31-2008 at 08:37 PM.
    I die a little on the inside...
    Every time I get shot.

  3. #43
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    7

    Default

    Hmm, it is not overwritten, btw. My file was:
    Java Code:
    class c{
    c(){
    System.out.println("c");
    }
    }
    
    class C extends c{
    C(){
    System.out.println("bc");
    }
    }
    class a{
    public static void main(String ar[]){
    new C();
    }
    }
    And I ended up with a.class & c.class (so there's no C)
    I die a little on the inside...
    Every time I get shot.

  4. #44
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,816
    Rep Power
    25

    Default

    What happens if you break you source file into two parts with c in one and C in the other? Compile c first, look at the folder and see what was there, then compile the other and check.

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

    Default

    I think Supamagier still don't have an idea about what we are talking here. He stuck with a single file.

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

    Default

    Quote Originally Posted by ProjectKaiser View Post
    Funny.

    On Windows XP, FAT32, Eclipse it gives compilation time error:
    Class file collision: A resource exists with a different case: /server/bin/misc/java_forums/C.class.

    On FreeBSD 6.3-STABLE example compiles and runs well.

    Java Code:
    > java a
    c
    bc
    I think it is potentially dangerous to give identical case insensitive names to few classes in the same package. Java is somehow system-dependent here, since it puts classes to files and it may come to hell as soon as not all filesystems are case-sensitive.
    thank you,,, u gave me the correct answer first

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

    Default

    Quote Originally Posted by Supamagier View Post
    Hmm, it is not overwritten, btw. My file was:
    Java Code:
    class c{
    c(){
    System.out.println("c");
    }
    }
    
    class C extends c{
    C(){
    System.out.println("bc");
    }
    }
    class a{
    public static void main(String ar[]){
    new C();
    }
    }
    And I ended up with a.class & c.class (so there's no C)
    u see tat C is not created bcoz c.class is already created before C,,, u can notice this by giving dir , after executing,,, C.class is not there,,,,,




    here in this case alone, java is not platform independent,,, bcoz it works in unix platforms

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

    Default

    Quote Originally Posted by Eranga View Post
    I think Supamagier still don't have an idea about what we are talking here. He stuck with a single file.
    eranga- can u tell me,
    there are some access modifiers like static , abstract, final,,,,, tell me, which of all these can used class declarations, either alone or simultaneously.....

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

    Default

    static - It's not allowed in class definitions. Use to define class variables, so maintain one copy of variables in classes. Also use to define class methods, and can only operate on class variables.

    abstract - Use in class definition, to specify that a class cannot be instantiated. Abstract class can contain both abstract and non-abstract methods. But abstract methods cannot included in non-abstract class.

    final - Used to define the constant level. Commonly final class cannot sub classed, final methods cannot be overridden, final variable cannot change.

    Hope it's clear. But it's better to read some materials regarding this. Seems you are mess with access controls.

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

    Default

    ok,,, clear,,,,

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

    Default

    Quote Originally Posted by j2vdk View Post
    here in this case alone, java is not platform independent,,, bcoz it works in unix platforms
    No, not "in this case alone". There are plenty of other things that can happen, or that you can program into your code, to make your code non-portable. As I have already told you (Runtime.exec being the largest one).

    Also, the code can work on case insensitive file systems, as well. Simply compile it on a case sensitive file system, and pack the resulting classes into a jarfile. They can then be used on a case insensitive file system as they are contained within the jarfile and no longer contigent on the file systems case sensitivity. As I have also already told you.

  12. #52
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    7

    Default

    Quote Originally Posted by Eranga View Post
    I think Supamagier still don't have an idea about what we are talking here. He stuck with a single file.
    :\ my bad. ;) I do now however. :)ty ^^
    I die a little on the inside...
    Every time I get shot.

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

    Default

    Quote Originally Posted by Supamagier View Post
    :\ my bad. ;) I do now however. :)ty ^^
    Yes, have a try and see. On which platform you are working on?

  14. #54
    Supamagier is offline Senior Member
    Join Date
    Aug 2008
    Posts
    384
    Rep Power
    7

    Default

    Windows (XP)
    I die a little on the inside...
    Every time I get shot.

Page 3 of 3 FirstFirst 123

Similar Threads

  1. String Title case
    By bugger in forum New To Java
    Replies: 6
    Last Post: 01-31-2012, 02:21 PM
  2. MySQL Case Sensitive Problem
    By techissue2008 in forum JDBC
    Replies: 1
    Last Post: 06-10-2008, 07:23 AM
  3. Case Based Reasoning
    By kbyrne in forum Advanced Java
    Replies: 4
    Last Post: 04-12-2008, 09:51 PM
  4. problem with operator in case
    By jimJohnson in forum New To Java
    Replies: 2
    Last Post: 03-21-2008, 09: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, 09: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
  •