UrbanPro

Learn Computer Software from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

If the class has access modifier with protected then the constructor of that class is public or protected?

Asked by Last Modified  

Follow 0
Answer

Please enter your answer

Experienced QA Trainer

Variables, methods and constructors which are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members' class. The protected access modifier cannot be applied to class and interfaces. Methods, fields can be...
read more
Variables, methods and constructors which are declared protected in a superclass can be accessed only by the subclasses in other package or any class within the package of the protected members' class. The protected access modifier cannot be applied to class and interfaces. Methods, fields can be declared protected, however methods and fields in a interface cannot be declared protected. Protected access gives the subclass a chance to use the helper method or variable, while preventing a nonrelated class from trying to use it. I hope this will be helpful for you! If any confusion then do let me know. read less
Comments

mca

The protected access modifier cannot be applied to class and interfaces. Methods, Members can be declared protected, however methods and members in a interface cannot be declared protected. Protected access gives the subclass a chance to use the helper method or variable, while preventing a non related...
read more
The protected access modifier cannot be applied to class and interfaces. Methods, Members can be declared protected, however methods and members in a interface cannot be declared protected. Protected access gives the subclass a chance to use the helper method or variable, while preventing a non related class from trying to use it. read less
Comments

Tutor taking Computer subjects Classes

protected.
Comments

Bsc it

Constructor is also protected
Comments

protected
Comments

Trainer

it is default if you do not specify.the access modifier of the class and constructor are independent.
Comments

Coaching

Right,Protected
Comments

Get Trained, Get Noticed n Let's WIN Together

Protected is the answer Here is an example: public class Clock { protected long time = 0; // time in milliseconds } public class SmartClock() extends Clock{ public long getTimeInSeconds() { return this.time / 1000; } } In the above example the subclass SmartClock...
read more
Protected is the answer Here is an example: public class Clock { protected long time = 0; // time in milliseconds } public class SmartClock() extends Clock{ public long getTimeInSeconds() { return this.time / 1000; } } In the above example the subclass SmartClock has a method called getTimeInSeconds() which accesses the time variable of the superclass Clock. This is possible even if Clock and SmartClock are not located in the same package. read less
Comments

Tutor

Class cant have protected access modifier, it can only have public, final and abstract keywords.
Comments

Oracle, Hindi, C++, C, MS Office, VBScript,JavaScript,Spoken English etc with 29 years of experience

protected
Comments

View 17 more Answers

Related Questions

I want to know the basic of C programing and which book is best for C programming??
Yashwant Kanetkar is the best book for that. You can use E Balagurusamy also.
Kumar
Which online teaching software is best?
If there is one student you can prefer skype even here you get more voice clarity. @ Vinodh, If you want to share screen in Skype, Got to Menu bar --> click on call menu --> there you can see share screen...
Aditya
what is cloud computing exactly? why it is more popular today?
Like rent out your flat to other. Cloud computing: Cloud computing is computing in which large groups of remote servers are networked to allow centralized data storage and online access to computer services...
Shailaja K.
What is the difference between Paste and Paste Special Option in Excel?
Paste: Paste all values, formats, formulas, comments, etc. Paste special: Paste with option, only values, only values, only formats, etc or all.
Vijayalakshmi G M
what is java core language?
Java is of 3 types - core java, java EE, Java ME Core java is used to develop application windows specific where Java EE is used for web applications and Java ME is used for mobile applications.
Md
0 0
9

Now ask question in any of the 1000+ Categories, and get Answers from Tutors and Trainers on UrbanPro.com

Ask a Question

Related Lessons

SQL is not a Rocket Science
I am a Professional and at the inital days I completely hate Databases but I forgot to know that "Everything starts and ends with us".It means the INTEREST starts with us. Everybody knows this but none...

Easy way to remember Java keyword.
ACCESS MODIFIER ACCESS SPECIFIER abstract, assert, const, final, native, static, strictfp, super, synchronized, this, transient, void, volatile public, private, protected, default DATA...

Rohit Deshbhratar

1 0
0

History of SQL server
In 1988, Microsoft released its first version of SQL Server. It was designed for the OS/2 platform and was developed jointly by Microsoft and Sybase. During the early 1990s, Microsoft began to develop...

Java and C trainer
Always think any conspect with real-time example like Object -- object must have states and behaviour then only we will call that thing is Object like fan is Object (rotating,color)

Merge Multiple PST Files into One Using PST Merge Tool
Overview of PST Merge Software The PST Merge is a software which merge multiple PST files into a single PST file. It makes sure that when PST files are merged into a new file, the original PST files should...
V

Recommended Articles

MCTS Certification in India The Microsoft Certified Technology Specialist or MCTS certification is suited for professionals who want to get into profession of implementing, building, troubleshooting, and debugging a particular Microsoft technology. The MCTS certification can give you a clear edge over others to showcase...

Read full article >

Whether you are using a laptop or a desktop, the mouse surely takes up time. Imagine if you could alone manage with the keys and not have to move your hands around the mouse? That would have been faster and so much time-saving. For example, Control + Z for undo or Control + Y for redo, definitely saves time when we are...

Read full article >

Decades back, when computers were being introduced in office premises, PPT was a new terminology that all employees tried to learn. Now PPT has made its way far away from offices and is an integral part of schools, colleges, and several other official proceedings. This is because PPT is an user-friendly computerized method...

Read full article >

Software Development has been one of the most popular career trends since years. The reason behind this is the fact that software are being used almost everywhere today.  In all of our lives, from the morning’s alarm clock to the coffee maker, car, mobile phone, computer, ATM and in almost everything we use in our daily...

Read full article >

Looking for Computer Software Classes?

Learn from the Best Tutors on UrbanPro

Are you a Tutor or Training Institute?

Join UrbanPro Today to find students near you
X

Looking for Computer Software Classes?

The best tutors for Computer Software Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Computer Software with the Best Tutors

The best Tutors for Computer Software Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more