yeah, I see your point Bench, but I suggested Pascal because of the simplistic syntax and it will allow people to start coding straight away, allowing the learner to get to grips with a few basics before going on to OOP.

it's not impossible for a complete beginner to go to Java first and I absolutely recommend it - which is why I stated Java would be a good language to start with.

I should have been more specific about what i stated, if a learner starts with pascal it's not necessary to spend years on it, perhaps a couple of months to help them get a feel for a programming language and so they don't feel so 'overwhelmed' at first, also don't forget society has changed, we are in a results society whereby individuals want things done 'NOW' not yesterday.

I would rather start with:

uses crt;

var
num1 : integer;
num2 : integer;
sum : integer;

begin
sum := num1+num2;
writeln('Total = ', sum);
end.

than:

public class sum
{
int num1;
int num2;
int total;

public static void main(String[] args)
{
total=num1+num2;
System.out.println("Total = "+total);
}
}

why not just start with C++

#include <iostream>
#include <string>
using namespace std;
int main ( void )
{
    cout << "hello world";
}

or VB6

sub main()
msgbox "hello world"
end sub

> Java would be nice if Sun actually helped organize and certify the
> stuff that’s scattered all over the net.
I wonder whatever you mean by this...

so do I... Guess he wants Sun to take over every single project and company that has anything to do with Java and consolidate everything into a single massive package.

Why that would be required to make Java any good while it's obviously not required for someone to do that to make C++ or C good baffles me though.

But it baffles me a bit less than someone recommending VB6 as a serious language to learn, not just at this stage when it's no longer supported by even its creators but at any time at all.

Hey, is the Java VM written in C++ ?

Member Avatar for iamthwee

vb.net should be supported.

?

Hey, is the Java VM written in C++ ?

i do believe that both the language and VM are created using C++.

Member Avatar for iamthwee

@bennet

I was just saying, that when jwenting said vb wasn't support anymore, that vb.net should be.

yes VB.NET is and VB6 is still used a lot inside microsoft

Windows Anti-Spyware was initially coded in VB6 right up until the point where it was released as Windows Defender (they swapped to C#.NET for better vista integration)

Member Avatar for xander85

java compilers and the java runtime environment are created using C++


learning both C and C++ is good but you may find yourself trying to unteach yourself things from C when you work in C++.

Second that!

why dont they rewrite the java VM in assembley it would be faster. maybe its too big.

because there's no need to. It's plenty fast enough as it is, and the way it's coded now a lot of the codebase is platform independent (meaning it compiles equally well for all platforms Sun supports), reducing lead time and investment drastically.
If written in assembly (or worse, Visual Basic) they'd have to rewrite the entire thing for each hardware and operating system platform supported, which by now has reached quite a number (Sun supporting both 32 and 64 bit versions of Windows, Solaris, and Linux, for a total of something like 10 different distributions).

Hey, is the Java VM written in C++ ?

Yeah, I first noticed that "java" executable is written in C/C++ when I had some hotspot error and it wrote down a core file, whose pstack showed calls from main()->createVM()... So it's C at least if not C++.
You can execute "file java" on unix to see this. Also if you have some tools to list out names in a file like nm, or c++filt...

Anyway, that is no scale to say that C/C++ is better than Java.

For the original question, I would say that decide the industry (telecome, services, product-based, web-services...) you wanna go to, and pick based on that. If you donno which industry then just leave C/C++ and Core Java all 3 of them, shouldn't take you long to learn the languages. It will surely take some time to actually be good at programming in ANY 3 of them. Coz write code and write good are different things. :)
Abt java, given that apart from core java you have a 100 other things you can learn e.g. J2EE itself is a Pandora's box.

A personal note: every time I have interviewed a candidate for a job in my projects, I have looked for language/theoretical knowledge and good attitude in freshers (just outa collage) and programming knowledge in candidates with prior experience.

commented: Please refrain from using abbreviations or acronyms in your posts. Write fully coherent, properly structured sentences or suffer my wrath. Mu-hah- ha. +11
commented: Don't worry about his wrath; I'll counterbalance it. +9

If written in assembly (or worse, Visual Basic) they'd have to rewrite the entire thing for each hardware and operating system platform supported...

JRE is platform specific. You can't ftp /usr/bin/java from *nix to a windows machine and expect to run a java program using that.
By not writing it in assembly they don't save on that front. I presume, it's just that it's easier to do it in C/C++ than in asm. :)

I know that full well. The BINARIES are platform specific.
A lot of the SOURCE of the JVM however isn't.

why dont they rewrite the java VM in assembley it would be faster. maybe its too big.

On a project of that scale, compilers for modern chips would probably optimize the code better than (most) programmers.

why dont they rewrite the java VM in assembley it would be faster. maybe its too big.

Correctness is more important than speed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.