0
Do we need to put termination mark after creating a separate class for a java program?
for e.g public myclass{ statement1; statement 2; ..... }; the last termination mark is necessary or not. I'm confused because it gets compiled in both the cases. please explain, new to the language.
7 Réponses
+ 2
nope bro it isn't needed in java .
There's no need for termination mark (semi colon ) after any }
+ 2
yup its needed in c++
+ 1
It was the same problem for me when i started C++ (as i had learnt java earlier).
But you need to practice and keep in mind small parts of both the languages . You'll get used to it soon as u do further .
If u know one language that doesn't mean u'll not practice that
keep doing both simultaneously applying a program to both the languges and u'll see the results soon.
+ 1
thank you guys it really helped.
0
and for c++?
0
I'm getting my languages mixed up like. i have learnt c++,c now I'm trying java. any suggestion you have to keep things sorted ?