Public,protected, private

can u tell me the difference etween access specifiers?

saisudha wrote:
can u tell me the difference etween access specifiers?(Again) You should hit Google and the Sun tutorials, then come on back if you have any specific questions.
The general assumption here is that you first put in effort to solve your problem on your own before asking the volunteers here for help. In other words, most of us are more willing to put out the effort to help those who have already shown that they are willing and able to put out some effort themselves. Good luck.
Edited by: Encephalopathic on Oct 12, 2008 6:58 AM

Similar Messages

  • Public/Protected?

    Hi :)
    This question is probably not as simple as the subject may sound, but probably it is quite simple anyway :D
    In this code from the Java tutorial, which contains just one class and in that one there are 4 methods, why do they use public on two of the methods and protected on the other two?
    It shouldn't matter since no objects of this class is created, right?
    http://java.sun.com/docs/books/tutorial/java/data/QandE/Anagram.java
    I think I know the difference between public/protected/private, but from what I know it only matters when you try to access objects created from the class...
    Thanks in advance :)

    Howdy,
    where methods are concerned the access modifiers control which classes can use the methods. You can read more here:
    http://java.sun.com/docs/books/tutorial/java/javaOO/accesscontrol.html
    Basically public methods are the ones that you want the rest of the world to be able to use. So in the Anagram class the method that can determine if two strings are anagrams of one another might be considered quite useful. Consequently it is made public. You'll also notice that it is declared static. This means that you don't need to create an instance (an object) in order to use that method. So if you had two strings you could do something like if (Anagram.areAnagrams(string1, string2)).
    The other public method is the main method. This is always declared public static void as this is the method called when you run java Anagram.
    The other two methods are protected and so cannot be used by other unrelated classes. (Read the link above for a better description). Quite why they have done this I'm not sure because I would imagine that either of those methods might be quite useful.
    regards
    sjl

  • Mixing public and private networks on the same switch

    Hello Everyone,
    I know this may get some security engineers in frenzy but wanted to know if there is a safe way to mix public and private networks on the same switch. 
    We have many remote offices that we want to add public wifi and a couple of other services that would be completely outside of our internal network.  Each office has a 3750 with plenty of open ports.  How can I safely create a vlan for public access on these switches which currently have our internal network on.  I have read that people are doing this to save on the cost of purchasing a dedicated switch.  Some people are using access lists and one person mentioned creating a private vlan for the public network.  I looked up private vlan and it seemed bit confusing.
    Is this recommended?  If not what would be the safest way to do this?
    Thanks Everyone

    Disclaimer
    The  Author of this posting offers the information contained within this  posting without consideration and with the reader's understanding that  there's no implied or expressed suitability or fitness for any purpose.  Information provided is for informational purposes only and should not  be construed as rendering professional advice of any kind. Usage of this  posting's information is solely at reader's own risk.
    Liability Disclaimer
    In  no event shall Author be liable for any damages whatsoever (including,  without limitation, damages for loss of use, data or profit) arising out  of the use or inability to use the posting's information even if Author  has been advised of the possibility of such damage.
    Posting
    How "safe" is relative.  If your running just one VLAN on a switch, that's would be the safest (basically the same as mixing traffic on the same wire - separation is done else where).
    If you multiple VLANs on a switch, then you need to determine how likely someone might figure out a way to breach the VLAN barriers.  (This isn't so easy on newer switches.)  If the VLAN isolation is breeched, then you need to examine what does that imply from a security perspective (for example can someone now inject or receive other VLAN traffic).
    For most purposes, I don't see mixing public and private VLANs, alone, on the same switch as much of a risk.  More of a concern is what can be reached on either VLAN and how well it's protected.

  • Email address public vs private

    I have set up a Skype account for all of my employees using the same email address and different account names.  When that email address is searched, NONE of the users show up.  When I look at my profile (my email address is attached to it) it shows it as "private".  I am assuming this is why when then email address is searched nothing comes up...problem is....I can't figure out how to make the email address public (if indeed this is why no one can be found under the email address).  
    Help!

    Initial Question/Comment: Privacy settings (who can call me, who can chat with me)
    3:00:51 PM System
    Thank you for contacting Skype Customer Support!
    3:00:51 PM System
    Dianne M. has joined this session!
    3:00:51 PM System
    Connected with Dianne M.
    3:00:55 PM Dianne M.
    Hello! Welcome to Skype Live Support! My name is Dianne M. How can I help you?
    3:00:59 PM user
    PLEASE SEE THIS THREAD FIRST: http://community.skype.com/t5/Security-Privacy-Trust-and/Email-address-public-vs-private/m-p/1860455...
    3:01:17 PM user
    The issue goes to being unable to alter the privacy status of email addresses in one's profile
    3:01:56 PM Dianne M.
    Let me check that first. Before we proceed, may I know your Skype Name and your first name, please?
    3:02:39 PM user
    Just to have this documented as yet another glaring lack in your system, I have now logged in twice just in order to submit this request!
    3:02:48 PM user
    USERID is ID and first name USER
    3:03:01 PM Dianne M.
    Sorry for the inconvenience, Usr.
    3:03:12 PM user
    no wonder Facetime is the preferred method for so many people
    3:03:41 PM Dianne M.
    Just to clarify, you wanted your email address to show as public but it won't show up as one. Is that what you want to do?
    3:05:36 PM user
    I have completed, some years ago, my profile and it has several email addresses, just as does the original poster ("OP") in the thread of conversation in the "Community" that I provided. Neither the OP nor I are able to select a status for the email addresses. Each and everyone is greyed out to "private" whereas clearly the OP wants to be able to select a "Public" status for one or many and in the same case so do I.
    3:07:16 PM Dianne M.
    I see. Let me see how we go about it. Can you give me 2-3 minutes while checking?
    3:07:47 PM user
    surely
    3:07:50 PM user
    thank you
    3:08:01 PM Dianne M.
    Thank you.
    3:13:47 PM Dianne M.
    Thank you for waiting.
    3:14:52 PM Dianne M.
    I'm sorry for the hold, but as checked, your email address is indeed was set as private and will not be shown to anyone, but those who know your email address can use it to search for you on Skype.
    3:17:49 PM user
    I never set it as private so how do I change it - note that I have several email addresses with the intent that one is public and others private
    3:19:02 PM Dianne M.
    Even though you did not set this up to be in private mode, this set up was designed by Skype to make sure that your account is protected from fraudsters and hackers who wants to gain access to others'
    3:19:12 PM Dianne M.
    email adresses.
    3:20:21 PM user
    So you are telling me that despite the fact that the profile clearly shows that there was an intended ability to select an option of private or public, you folks arbitrarily choose to constrain the user from the option that you designed into the system?
    3:23:27 PM Dianne M.
    For the email address, yes.
    3:24:02 PM Dianne M.
    I'm sorry if this seems to be an inconvenience to you,

  • Difference between public void, private void and public string

    Hi everyone,
    My 1st question is how do you know when to use public void, private void and public string? I am mightily cofuse with this.
    2ndly, Can anybody explain to me on following code snippet:
    Traceback B0;//the starting point  of Traceback
    // Traceback objects
    abstract class Traceback {
      int i, j;                     // absolute coordinates
    // Traceback2 objects for simple gap costs
    class Traceback2 extends Traceback {
      public Traceback2(int i, int j)
      { this.i = i; this.j = j; }
    }And using the code above is the following allowed:
    B[0] = new Traceback2(i-1, 0);
    Any replies much appreciated. Thank you.

    1)
    public and private are access modifiers,
    void and String return type declarations.
    2)
    It's called "inheritance", and "bad design" as well.
    You should read the tutorials, you know?

  • Viewing document characteristics in Easy DMS public and private folders

    We have classified our documents in SAP Document Management System.  We are viewing the DIRs in Easy DMS.  In the public and private folders, the classification characteristics columns can be added to the screen report, however the values for the characteristics do not appear in the columns.  If we use the search function and view those same documents in the search screen, the characteristic values do appear.  How can we get these values to appear in the public and private folder views?  There does not seem to be an OSS notes which address this discrepancy.  In advance, any assistance is most appreciated.

    Hi Barry - As Daniel explained, sometimes system behaves if the Default box is not checked but I want you to check the EasyDMS version/patch you are using. Below is the screenshot of latest version/patch.
    If you have old verison/patch, please implement the latest version/patch and check.
    /Tilak

  • How to know whether a function is public or private in PL/SQL?

    Hi friends,
    I want to know if there is any method to specify a function or procedure as public or private?
    If so how?

    Hmm.
    Public or private?
    Ok. Probably two explanation ->
    1. If you have the execution/select/modify privileges the that function or procedure is public else private. Else according to those available features you can call it private(If you have no privs to your schema) or partial private(Never heard this word in Oracle - just to make you understand. ;) If you have one or few privs missing from your list of privs).
    2. If you create any procedure or function inside package specification - then it can called public provided that you should have proper privs as discussed in point 1. If your procedure or function declared inside the package body then it is private. You cannot directly call them outside that package. If any other method of that package is calling it - then only you can use it.
    Regards.
    Satyaki De.
    Edited by: Satyaki_De on Nov 17, 2008 12:21 AM

  • BizTalkServer 2010 SFTP Adapter from CodePlex - Configuring send and receive locations with SSH public and private keys

    Hi there,
    I am looking for step by step instrcutions on how to configure SFTP Codeplex adapter for both receive and send ports.
    Out business partner with whom we push/poll the files from wants us to use SSH encryption/decryption etc.
    Just wondering if the following functionality is supported in Codeplex SFTP adatper without having to write any code.
    Appreciate if there is manaul to do this for SFTP. BTW I do have all the our public and private keys and business partners Public key for configuring.
    For Send port: 1. we would need to encrypt the file with our business partners public key
                          2. sign the file with our private key.
                          3. Send the file through to SSH client which eventually transfers to Remote server.
    Receive port:   1. Connect to SSH Server with SSH-2 key and receive the file
                          2. Verify the file's digital signature agaisnt the Business partners PGP public key
                          3. Decrypt the file using our PGP Public key
    Thanks in advance

    Yes it is supported.
    You can find its documentation in this link 
    You can find section X.509 Certificate Identity Keys
    You can set public and private key in property SSH Identity thumbprint  of send and receive port
    I prefer to test it using client tool like
    FileZilla or WinSCP then test it using sftp adapter
    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer

  • Public vs Private

    When I publish my app through the folio creator tools I'm given the option of Public or Private. Can someone explain what exactly they mean? If I set it to Private can I still share it with clients? Do they have to sign into their Content Viewer Apps with my login or can they still use their own? What about Public? Who can see it then?
    I presume these decisions have no bearing when I eventually send the app to iTunes, or do they?

    OK so if I'm creating a new folio for my Multi-folio app, all I do is publish it as Public and people who have downloaded my App (Custom Viewer) will have the option of downloading it? Does this mean that folios created for multi-folio apps are published without going through iTunes' approval process and will just appear immediately after they've been published through the Folio Creator Tools?
    With regards to publishing Private, do readers have to login with my account details to view or will can I share it as I would an app hosted on Acrobat (ie. to anyone with an Acrobat account)?

  • SQL Installation for SharePoint 2013 - Windows Firewall - Profile - domain, Public and Private - Which ones to choose?

    Hi there,
    I am setting up SQL Server (to be used in our SharePoint 2013 farm).
    The Firewall exception for SQL server gives me three choices in Profile section as 
    Domain, Public and Private profiles 
    Which ones should I choose please? 
    Thank you so much.

    Hi,
    According to your description, my understanding is that you want to set the firewall exception for SQL server.
    Domain profile—This profile is active when the server is connected to an Active Directory (AD) domain via an internal network. This is the profile that's typically active, because most servers are members of an AD domain.
    Private profile—This profile is active when the server is a member of a workgroup. Microsoft recommends more restrictive firewall settings for this profile than for the domain profile.
    Public profile—This profile is active when the server is connected to an AD domain via a public network. Microsoft recommends the most restrictive settings for this profile.
    More information, please refer to the link:
    http://windowsitpro.com/windows/windows-server-2008-r2-firewall-security
    Please 'propose as answer'
    if it helped you, also 'vote helpful' if you like this reply.
    Prabhu

  • Changing oracle DB link from Public to Private

    Dear All,
    I would like to know what will be the impact of chaning a PUBLIC db link to PRIVATE db link.
    following is the scenario.
    In our Prod distributed environment, there are many Databases which need to talk to each other for which we have create PUBLIC db links.
    Similar PUBLIC DB links are also created in our DEV/ST/SIT/UAT environment...
    Now we would like to know;
    1. What will be impact (especially negative) if those DB link are converted to PRIVATE.
    2. What are the disadvantages aer this PUBLIC to PRIVATE conversion...code espacially application users, code execution etc.
    3. What are the considerations / steps to be taken to avoid any issues due to this PUBLIC to PRIVATE conversion.
    Thanks and Regards
    Santy.

    What is he reason you want to do this?
    1. What will be impact (especially negative) if those DB link are converted to PRIVATE. Public link is accessible to every user in the database and Private db link ca be used by only the owner of the db link. This could potentially break the workflow.
    2. What are the disadvantages aer this PUBLIC to PRIVATE conversion...code espacially application users, code execution etc. Depends. Public are generally considered more unsecure. Only disadvantage I can see is that you have to fully study your environment before doing it. You have to check all the users who are using that public database link and create private one for all of them.
    3. What are the considerations / steps to be taken to avoid any issues due to this PUBLIC to PRIVATE conversion.See 2

  • Different physical networks for public and private IPs ?

    Hi,
    My ISP router, public sides and private sides of my servers are all plugged on the same switch. I was wondering if the troubles I experience with my home directories server, hanging all services very often, can come from that config. Does it make sense to usse different switches for public and private IPs ?

    It's a good practice to put external and internal traffic on different switches or, at least, on different VLANs on the switch to segregate the traffic.
    However, it's unlikely to cause the problems you describe unless there's something wrong with the network (e.g. it's overloaded or experiencing some kind of broadcast storm.
    If you have a separate switch it's worth trying. Without knowing the make and model of your switch it's impossible to tell whether VLANs are a viable option for you.

  • Changing access specifier from public to private has no effect at runtime

    The scenario is like this.
    I have two classes A and B and from B i am calling some public methods on A. Until now everything is okay. Now i am changing the access from public to private for the methods in A and recompile it (i'm compiling only A).
    The point is, I am not making any change to B, which is still referring to the methods in A, whic are now private .
    What will happen if now i try to invoke the above methods on A through B ?? Class A should not allow that, since it is private now. But I am able to access those methods from B!!!
    Any idea why it is occurring?????
    Now if I try to compile B(note that i didn't compile it earlier along with A), it will throw a error saying that B is trying to access methods which have private access in A, which is right...

    Nowadays (April 2004) this is still the case, I ran into this behavior today and had a long discussion on it on some java irc channel, but nobody really seemed to know what is exactly going on.
    My questions: This access-checking seems to occur only at compile time. Is there a document or whatever notice from sun describing this? Is performance the only reason to do such a thing?

  • I need to create public and private keys for security certificate and I can't find the certificate. Where is it?

    I purchased a security certificate, and the site tells me that it was successfully installed. I need to export the certificate so that I can create the public and private keys, but I cannot find the certificate to do so.

    Thank you.

  • What does choosing interface as public or private during rac install mean?

    What does choosing interface as public or private during rac install mean? You see the option on the OUI screen in the step after adding nodes on which you need the install.

    Public: Is the interfacce where the connection to the db is done (user, application server etc).
    Private: Used for communication between the nodes in the cluster and is done by the instances. No one should be able to connect via this interface.
    -Andy

Maybe you are looking for

  • HP LaserJet Pro 200 m251 won't print PDF

    I have an HP Laserjet Pro 200 that will not print PDFs.  The documents get stuck in the print queue and I have to delete them and restart the printer.  I have reinstalled the driver and updates and reinstalled Adobe Reader and updates.  Called HP and

  • Help program not working.

    Dear All I using a Java Book called Java Gently written by J.Bishop Im working on a program and its typed out correctly and compiled corretcly, but for some reason wont work i dont know what parameters i need to enter. take a look: class CurioStore1

  • How do I view a book I purchased at Itunes on my computer

    How do I view a book I purchased at Itunes on my computer

  • How to sync primary and standby database in 11GR2 on linux

    Hi , How to sync primary and standby database in 11GR2 on linux . Both my primay and standby are 3 node cluster each. Can you please suggest a good link and brief steps . Thanks

  • /etc/group and /etc/passwd corrupted

    My /etc/group and /etc/passwd (and possibly others) are corrupted (my silly error handling pacnew files). I tried restoring the backups (group- and similar) and also ran grpconv, pwdconv,, pwck without fixing things.  I've edited the files, using tho