+ 1

java classes

how can i define classes? is there 3 types of classes like c++ ? public,private and protected? How can they be defined?

13th Jun 2017, 9:38 AM
Saleh Sayeem
Saleh Sayeem - avatar
2 Respuestas
13th Jun 2017, 10:03 AM
देवेंद्र महाजन (Devender)
देवेंद्र महाजन (Devender) - avatar
0
those are the access modifiers... and in java we have four access modifiers default, public, private, and protected.. Since java is kind of pure oops you cannot create any method or variable without a class.. so the first thing that we create in java programming is the class defining class:- access_modifier class class_name { } look here we don't put a ; after the end of block, as we used to do in c++
13th Jun 2017, 10:13 AM
Мг. Кнап🌠
Мг. Кнап🌠 - avatar