473,378 Members | 1,321 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Access specifier

9
public class A
{
......
void display()
{
......
}
.......
}

private class B extends A
{
........
void display()
{
....
}
...
}


What will be the visibility or access specifier for the method display() in class B? why?
Jul 31 '08 #1
3 1141
Brosert
57
This sounds like Homework....
Jul 31 '08 #2
r035198x
13,262 8TB
What do you think is the answer? Why?
Jul 31 '08 #3
shoby
9
I think the access specifier will be private in B since the access specifier for class B is private...


This is not any homework...this question was asked in an interview that i attended...
Aug 1 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: mshetty | last post by:
Hi, I have a class x with two public methods xmethod1 and xmethod2. I want to derive a class y such that it can access only xmethod2. I have done the following and it compiles please let me know...
4
by: p988 | last post by:
using System; using System.Windows.Forms; using System.Drawing; class MyForm : Form { MyForm () { Text = "Windows Forms Demo"; }
1
by: Paul Cheetham | last post by:
Hi, I am creating a custom control in c#, derived from System.Drawing.Image In my derived control, I want to make the Public property Image into a Protected property, as I only want to...
3
by: ElanKathir .S.N | last post by:
Hi all In Vb.Net, I tried a sample like this: Private Class ---------- --------- End Class But FrameWork is not accecting this class, It showing some Error like
5
by: dost | last post by:
can u tell me the diffrence between...... private public and protected .........in........these.......which one...is access modifier....and which one..is specifier....... and....the diffrence...
18
by: Money | last post by:
Here in this thread http://groups.google.co.in/group/comp.lang.c/browse_frm/thread/c16d280238a95c9/e3b0dbf76f3e02e3?q=finding+endianness&rnum=1#e3b0dbf76f3e02e3 Tydr Schnubbis in 3rd reply used...
2
by: sarathy | last post by:
Hi, What is the difference b/w a "storage class" and "storage class specifier"? It is said that there, Storage Class --automatic static ( K&R ) Storage Class Specifier --auto extern register...
0
by: Ole Nielsby | last post by:
The C++ syntax goes like: type-id: type-specifier-seq abstract-declarator(opt) type-specifier-seq: type-specifier type-specifier-seq(opt) which means, a type-id has 1 or more...
3
by: Rahul | last post by:
Hi Everyone, The following code works fine, class A { private: friend void sample(A& obj) { printf("in friend...\n"); printf("%d",obj.i);
7
by: codinginc | last post by:
Hi Everyone, Is it possible to insert format specifier in a form of variable. See example below Standard from char result; float fnum = 3.14159; sprintf( result, "%f", fnum );...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.