troubleshooting Question

Differences between C++ and Java

Avatar of Rohit Bajaj
Rohit BajajFlag for India asked on
Programming Languages-OtherProgrammingC++Java
8 Comments1 Solution48 ViewsLast Modified:
Although there could be a very simple answer to this question - That's how languages are designed.
But I recently started coding in C++. My main language is Java. And I found it really weird.
Like things like you need to have a function declared on top to use it. A function name and variable name cannot be same. These are like entirely different from Java.

But being a language for so long C++ and having this restriction of declaring function signature on top seems little unnatural in the sense they could have easily removed this one. But probably the design of the language doesn't allow now.

Just put my thoughts above. Wanted expert views and comments for a discussion.
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 8 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros