Java or J#

Discussion in 'Web Design & Coding' started by Blue Jack, Jun 10, 2005.

  1. Blue Jack

    Blue Jack OSNN Addict

    Messages:
    103
    I took a java class years ago, and I stumbled on my old book today when I was cleaning out the basement. I started thumbing through it and though it would be fun to relearn some aspects of java.

    Since the course I have really enjoyed VB.Net and ASP.net. So I was thinking about forgoing the java and jumping right into J#. But to be honest, I don't really know the difference between the two, other than one depends upon the net framework.

    For those of you with expirence with both, or either, which would you choose to play with (for fun)? I don't mind at all using a text editor to learn the code, I've fallen in love with textpad, but the j# does offer a nice editor.

    I'm bored and I need a summer hobby. I thought about C# once again, but then I remembered the pain of playing with C++ and quickly let go of that thought. Any suggestions?
     
  2. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    C# is fun! I've never used J# myself, but C# actually does away with most of the "painful" aspects of C++. You don't have to mess around with pointers, and since you're writing managed code, you don't have to worry too much about memory management either. As in the case of Java, the CLR's garbage collector does all the dirty work. ;)

    If you're looking into taking up a language seriously, I'd suggest going with something mainstream like C++, Java or C#...perhaps even VB.NET. I personally don't know of anyone who uses J#, to be honest.
     
  3. LordOfLA

    LordOfLA Godlike!

    Messages:
    7,027
    Location:
    Maidenhead, Berkshire, UK
    I dunno, our new customer control panel is being written in C#. Mainly for its RAD element over VC++. If MS could just add RAD to VC++ then it'd be awesome :D
     
  4. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    I like pointers.
     
  5. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    But they are basically non-existant in properly written C++ code.
     
  6. Blue Jack

    Blue Jack OSNN Addict

    Messages:
    103
    Thanks for the info. Honestly, I don't know anyone either that uses j#. Maybe I will give c# another try. I was trying to use it as my backend for my asp pages, but VB.Net was just so much easier.

    I'm not really planning anything serious, just learn as I go and have fun. VB.NET was a lot of fun, but I ran out of ideas. Well, I had *some* ideas, but all the source code and examples for the ideas I had used C#.

    I have a feeling its all going to boil down to what book I can find that looks like the most fun. Just for the love of god: no more hello worlds!!
     
  7. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    PHP:
    Code:
    <?php
    
    echo "Hello world!";
    
    ?>
    
    C++:
    Code:
    #include <iostream>
    
    int main() {
            std::cout << "Hello World";
    }
    
    Perl:
    Code:
    #!/usr/local/bin/perl
    
    print "Hello World!";
    
    Java:
    Code:
    class Main {
            public static void main(String [] Args) {
                    System.out.println("Hello World!");
            }
    }
    
    Python:
    Code:
    #!/usr/local/bin/python
    
    print "Hello World!"
    
    C:
    Code:
    #include <stdio.h>
    
    int main() {
            printf("Hello World!");
    }
    
    Brain****:
    Code:
    ++++++++++[>+++++++>++++++++++>+++>+<<<<-]>++.>+.+++++++..+++.>++.<<+++++++++++++++.>.+++.------.--------.>+.>.@
    HTML:
    Code:
    <html><head></head><body>Hello World!</body></html>
    Basic:
    Code:
    10 print "Hello World!"
    
    SH/Bash/ksh/...
    Code:
    #!/bin/sh
    echo "Hello World!"
    
    Ada:
    Code:
    with Ada.Text_IO; use Ada.Text_IO;
    
    procedure Hello is
    begin
       Put_Line("Hello World");
    end Hello;
    Ruby:
    Code:
    #!/usr/bin/ruby
    #
    puts "Hello world!"
    Hello world's for all the programming languages i know.
     
  8. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
  9. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    That's cheating NetRyder, i knew them off the top of my head.
     
  10. NetRyder

    NetRyder Tech Junkie Folding Team

    Messages:
    13,256
    Location:
    New York City
    I didn't claim to know them all. :D
    I can actually only do these: C, C++, C#, Java, BASIC, Pascal, Scheme, LISP, Prolog, ML, Objective Caml, Perl, Python, sh/Bash/ksh, HTML, PHP, JSP, ASP.NET, JavaScript, Maple, and MATLAB.
     
  11. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    your Java should be 'final String[] Args' and if your C/C++ main functions have an int return type surely they should return an int ;) :p
     
  12. [question]
    how did ppl get assembly language to work, did they have someone coding it in binary first?
     
  13. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    You mean like chicken or the egg? ;) How did they compile the first compiler?

    Good question. It probably "evolved". ;)
     
  14. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Final is not needed, but yes, it could be added. And no, my C/C++ programs don't need a return 0; statement, it is added by the compiler. Try it.

    Code:
    bash-2.05b$ cat file.cc
    #include <iostream>
    
    int main() {
            std::cout << "Hello World!";
    }
    bash-2.05b$ ./a.out
    Hello World!bash-2.05b$
    Code:
    bash-2.05b$ gcc file.c
    bash-2.05b$ cat file.c
    #include <stdio.h>
    
    int main() {
            printf("Hello World!");
    }
    bash-2.05b$ ./a.out
    Hello World!bash-2.05b$
    :p. Gotta learn how to write fast and easy code :p. It's in the standard that return 0; should be assumed in main, unless a return statement is found.

    It can be found exactly in the following standard: 14882:1998, 3.6.1.5

    (Thanks to Cynic on Efnet.)
     
    Last edited: Jun 11, 2005
  15. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    Originally it was all in binary using series of switches to program it, then assembler was created which mapped common-ish english words to the binary equivalents, the assembler begat the C language and eventually the C language was able to have its compiler written in C but was first compiled using an assembler program. The history of Programming and C is all quite interesting really


    @X-Istence: Cool I didnt know that about C(++)