Why can an inner.inner class not be static?

First, look at these 2 classes:
public class A1 {
public A1() {
new B1.C1();
public class B1 {
public static class C1 {
public class A2 {
public A2() {
new B2.C2();
class B2 {
public static class C2 {
Class A2 will compile just fine, but A1 will not saying that I can't define class C1 as static.
Why not?
Class C1 is not associated with an instance of B1 (because it's static), and we already have an instance of A1 (since we're in the constructor).
Why is this so radically different that A2 (which works)?

In class A1 the inner class B1 is just like a mehtod of class A1.
So how we cant create static variable inside a method , similarly the class A1
didnt accepting its inner class b! to create static class.
(This is my assumption/view only, may be wrong)

Similar Messages

  • My imessage has just stopped working with one of my contacts, on both of our phones imessage still works with other contacts. Why can we imessage others but not each other?

    My imessage has just stopped working with one of my contacts, on both of our phones imessage still works with other contacts. Why can we imessage others but not each other?

    Yes... to no avail

  • Why can't I syncronize Outlook notes with IPhone notes

    Why can't I syncronize Outlook notes with IPhone notes

    Because Apple wants you to use their services and not Microsoft's.

  • Why can my 8500 A Plus not download forms from the web?

    Why can my 8500 A Plus not download forms from the web?

    Hey indianadave,
    Are you're apps working from the front panel of the printer? You will want to make sure that you have internet connection to your printer. If you don't, you can follow these steps:
    1. Find your printer's IP address.
    2. Enter the IP address in the address bar of your internet browser.
    3. Click the network tab.
    4. Click IPv4 under the wireless/wired menu on the left hand side of the printer screen.
    5. Set Manual settings.
    6. Set a Manual preferred DNS of 8.8.8.8 and alternate DNS of 8.8.4.4.
    7. Click apply and try downloading the forms again.
    Although I am an HP employee, I am speaking for myself and not for HP.
    If I have resolved your issue, feel free to provide Kudos and make sure you mark this thread as solution provided.

  • Why can't i use class.forName(str) ?

    Heys all i have this piece of code which is working fine:
    *try {*
    java.lang.Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    *} catch (java.lang.ClassNotFoundException e) {*
    now the problem is that i was under the impression that i could use class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); but it wouldn't compile. does anyone know why is this so?

    Class.forName() says "call the static method forName() that is defined in java.lang.Class". It returns a reference to an instance of java.lang.Class.
    SomeClass.class is known as a class literal. It is not a member, not a field, not a method. It evaluates to a reference to an instance of java.lang.Class.
    You cannot do class.something().
    Edited by: jverd on Oct 26, 2010 9:46 AM

  • Why can I receive iMessages but not send them?

    I'm signed into Apple ID for iMessages and have both wifi and cellular data available but I can't send iMessages! I'm receiving them but can only respond by text. FaceTime is also working!

    Macrumors posted a solution for this.  I used it and it seems to have worked for me.
    Here's what they said:
    1. Turn off iMessage in Settings > Messages
    2. Reset networking settings in Settings > General > Reset
    3. Reenable iMessage in Settings > Messages
    Source:
    http://www.macrumors.com/2013/09/30/resetting-network-settings-may-fix-imessages -not-working-in-ios-7/

  • Why can't I open .class files?

    I have never needed to open a .class file but now I do. It pops up with an error message and says check the console. Is Jar Launcher outdated for Mavericks?
    Tech Specs:
    2010 Macbook Air OSX Mavericks
    Trying to use Jar Launcher for a .class file.

    This is not the forum for your problem. Maybe the video game section of this site or the site you got the things from.

  • Hi, why can't I see my notes from my iPhone on my iPad? I can see my iPad notes on my iPhone., Hi, why can't I see my notes from my iPhone on my iPad? I can see my iPad notes on my iPhone.

    Hi, I just set up my iCloud for notes, though I got my contacts established a year ago. I first turn on the notes on my iPhone, then I created a free iCloud mail account as instructed. Then I turned on my notes on my iPad. But I found I can see my notes from my iPad on my iPhone. The notes I stored in my iPhone did not show up on my iPad. Please help me. Thanks

    Welcome to the Apple Community.
    First check that all your settings are correct, that notes syncing (mail and notes on a computer) is checked on all devices (system preferences > iCloud on a mac and settings > iCloud on a iPhone, iPad or iPod).
    Make sure the notes you are adding are added to your 'iCloud' account and not an 'On My Mac', 'On My Phone'  or other non iCloud account (you can do this by checking in accounts on an iOS device, or the left side panel in mail on a computer), non iCloud notes will not sync.
    If you are sure that everything is set up correctly and your notes are in the iCloud group, you might try unchecking notes syncing (mail and notes on a computer) in the iCloud settings, restarting your device and then re-enabling notes syncing.

  • HT1600 Why can my apple tv 2 not find the latest update?

    I tried selecting the  update software option and it says that my apple tv is up to date. I checked the about section and it says that I am currently running apple tv software 5.3. IOS build 6.1.4. I know this is not the most current version. How can I make it find the most current version? I want my itunes radio on my apple tv.

    I have one remaining Apple TV (second generation, Model # A1378, Order # MC572LL/A) that I have yet to update. As a result of a large number of threads appearing in a short period of time reporting that the update is no longer available, I tried to update my own and was told it was up to date.
    It’s therefore quite possible the update has been temporarily removed and the best advice I can provide is to sit tight and wait.

  • Why can't I sync my notes from my iphone to my iMac?

    Hello,
    I wanted to sync my notes from my iphone 4s to my imac(OS X 10.8.2)
    So I went to icloud on my iphone, checked the 'notes' box and made a icloud mailaddress, but it never askes me to set a password. But a account was created anyway and I can send and receive mails with it.
    I went to my imac, settings, icloud and there I wanted to enter my new icloud emailadress, but it asked for a password. I have allready tried my appleID password but the account is nog being added.
    I also tried checking the notes box with the icloud option that was in the left column, but nothing is happening.
    What am I doing wrong?
    Regards,
    Yanara

    Are you sure that you selected the book to sync to the iPad?
    iTunes 11 for Windows: Set up syncing for iPod, iPhone, or iPad

  • Why can I receive email but not send

    Can receive email to Mail program but can't send. The Doctor says my internet connection is open.
    Any ideas?

    If it says that it can't send the message or that it had some sort of problem sending the message add a letter or word or take off a letter or word.
    Make sure that firewall isn't blocking anthing.
    Message was edited by: chrisfromhopewell

  • Why can I receive emails but not send them?

    I have an iPhone 4, and I recently updated to iOS 7. Since the. I have not been able to send any emails. I am able to receive them, but not send them. I keep getting an error message saying that something is wrong with my password or username. I have tried to hard restart the phone, revert to a backup from before I updated the phone, and also deleted all emails and redid them, all with the same result. What should I do, and if it's a consistent problem with the new system, when is Apple going to fix it?

    Yes, I have tried everything the sites have said besides taking it in to the Genius Bar. I tried hard restarting it, making sure my internet connection worked, moving off and on other networks, used an old backup to when I had iOS 6, deleting al my email accounts and adding them back, none of it has worked.

  • Why can't I check the Notes icon in the iCloud system pref?

    After upgrading my iMac on 11/19, I'm trying to get the Notes app to sync with iCloud, as I use my iPads' Notes app extensively at work.  When I open the iCloud system preference, the Notes app is checked at first.  It then becomes unchecked and when I try to re-check the box. system preferences quit unexpectedly.  I've also tried adding a note first on the iMac, and then going into iCloud system preferences, but get the same result.
    Thanks in advance for your help,
    Mike

    OK, reading others posts about multiple accounts, I went into the Notes on my iPad, and clicked the Accounts button.  Sure enough, all of my notes on the iPad were under the account Yahoo.  Going into Notes on my iMac, and then going into Accounts under the Notes menu item, I only had iCloud and att.net.  When I chose the att.net account AND checked the Notes box, all of my iPad notes synced with the iMac.
    I agree with a previous poster in another message, this is not made clear how to set this up.  I guess I lucked out that all 3 of my iPads are set up identically with regards to Notes, Accounts, and iCloud.
    Hope this helps someone else.
    Mike

  • Why can't I see the notes from my iPad on my iPhone

    I cannot see any notes via iCloud from the other apple device. I have iPad 2 and iPhone 4S. I did backups on both of them, still not able to see notes from iPad on my phone. I have to type them in separately on each device.

    thanks for helping me troubleshoot, yes they are both turned on. Then I did icloud manual backup. I don't think I've ever been able to see the notes from one on the other, but I saw it was featured and I have tried without success to get them to sync. My pictures do, but my notes won't.

  • Why can I select text but not an image in my layout?

    Illustrator 5.5 question (working on a mac lion system) - Trying to create a file for my screen printer with 2 colors separated to create his screens.
    Problem - I am new to Illustrator. I created a 2 color layout with text and image in Photoshop and I saved it as an eps file. I opened it in Illustrator and I created 2 layers for each color. I can select the text but I cannot select the image to separate the colors? I used the select and direct select tool, but I still cannot select the image?
    What am I doing wrong?
    Keitodd29
    [email protected]

    Hi Jet,
    The artwork is 100% RGB. The art, text and image, are presently red with blue outline. Should I rasterize the image and convert it to 1-bit gray scale?
    Where do I determine the number of bits in gray scale?
    Concerning layers, I was following the tutorial Preparing Artwork for Screen Printing in Adobe Illustrator at this link. 
    http://www.smashingmagazine.com/2010/12/07/preparing-artwork-for-screen-printing-in-adobe- illustrator/ 
    Thanks!
    Keitodd29

Maybe you are looking for

  • Preciso de ajuda com gravação de voz

    Preciso de ajuda com gravação de voz - fiz várias gravações de uma hora cada e todas funcionam bem. No entanto tenho uma gravação de quase duas horas que não consigo nem ouvir nem exportar para o pc. Preciso MUUUUUIIIIITO acessar esta gravação.. Por

  • JDK 1.6: Annotation Processing & Compiler Hack

    Hello, I am currently using JDK 1.6.0_23 For one of the requirement, I am going with annotation processing & compiler Hack using Tools.jar available as part of JDK. I have refered a PDF - "The Hacker's Guide to javac (PDF) by David Erni and Adrian Ku

  • How to get jsp page form action this page use ajax

    i want to get form action result editThree div. however, ajaxpage open new window.how to decide it? ajaxCallPages.js var loadedobjects="" var loadingcontainer="loading" var loadstatustext="<img src='images/loading.gif' />" //loading var rootdomain="h

  • AD Integration with UCM 11g - Selecting users from multiple OU

    Hi All, I have integrated AD with UCM 11g and able to login with AD username/password to UCM application. The one problem I face, the users of this application are scattered in different OUs in AD. Like OUs are created for different locations and use

  • Check point query information

    Hello Team, one of my production server i am continually getting this error: [CHECK POINT FREE SPACE QUERY TIME OUT] this information we are getting through third party tools and IT team raise ticket to DBA team, Note:we checked sql server error log