Doubts from Kathy Sierra Book

Hi everone
I am preparing for SJCP5.0 from Seirra and Bates and i have completed the 1st chapter. I have a few queries from the same chapter. Can anyone help me on these quetions?
1) What is the difference between class variable and instance variable?
2) is there only 1 currency character ($) and only 1 connecting character(_)?
3) Is class2. valid name for a class name?

1.
Given the following,
1. interface Base {
2. boolean m1 ();
3. byte m2(short s);
4. }
Which code fragments will compile? (Choose all that apply.)
A) interface Base2 implements Base { }
B) abstract class Class2 extends Base {
public boolean ml() { return true; } }
C) abstract class Class2 implements Base { }
D) abstract class Class2. implements Base {
public boolean m1() { return (true); } }
E) class Class2 implements Base {
boolean m1( ) { return false; }
byte m2(short s) { return 42; } }
This is the exact question. Look at option D. According to the question this option should be wrong. However the solution says that option D is correct because it is implemented properly.
Can you help me on this?

Similar Messages

  • Query from Kathy Sierra book

    In chapter 6 self test question no 9 :
    System.out.format("%s", new Long("123"));
    This code is said to be fine and that it will compile without any error.
    Here we are creating and object of the Long wraper class and %s is for String. In the previous chapters we studied that Wrapper classes cant be widened among one another.
    So can any tell me the concept why this piece of code will compile?

    It compiles without error because the first argument is a string.
    It also runs without any problem because %s is a very accomodating format specifier - it will simply print the string form of the corresponding argument.import java.util.Date;
    public class SFormat {
        public static void main(String args[]) {
            System.out.format("%s%n", new Long("123")); // 123
            System.out.format("%s%n", System.out);     // java.io.PrintStream@9304b1
            System.out.format("%s%n", new Date());     // Fri Jun 01 17:46:14 NZST 2007
    }

  • Kathy Sierra book for SCWCD 1.4

    Hi,
    Somebody pls give me pdf for Head First Servlets & JSP by Kathy Sierra. I am preparing for the SCWCD 1.4 exam. Please help me with some mock test as well.
    Thanks in advance.
    Nikesh Shah.

    Hi Nikesh,
      I have searched that <b>nowhere i can find this Head First Servlets & JSP by Kathy Sierra</b>.  You can go through this <a href="http://java.sun.com/j2ee/1.4/docs/tutorial/doc/J2EETutorial.pdf">J2EE Tutorial</a>, which will give you detail information for free download.
    Regards,
    Venkatesh. K
    /* P.S: Consider Points if it is useful */

  • Kathy Sierra SCWCD 1.4 book

    Hi,
    Can somebody please give me the book for SCWCD 1.4 i.e. Head First Servlets and JSP by Kathy Sierra . I am preparing for the exam. Also please provide me some Mock test for the same.
    My ID is [email protected].pls help.
    Thanks in advance.
    Nikesh Shah.

    It's not illegal Kajbj.Isn't illegal? Why do you think it isn't illegal to download copyrighted material? Why would it be legal?
    We hv to share our knowledge with others..Sharing knowledge isn't the same as stealing/copying copyrighted material.
    So wht's
    the problem in giving books online...The problem is that it's illegal. Authors usually want to get paid for what they write.
    I know this is
    very important book for SCWCD exam..so the author of
    the book has not given permission to download the
    book.Because he/she wants to earn money. Wouldn't you want to get paid if you write a book?
    New_Kid : pls find the book on the net .Please don't.
    Kaj

  • I desperately to uninstall adobe reader from my Mac book air. I sent adobe reader to trash and afterwards look for internet plugs in in library but the folder is empty. Can anybody help me?

    I desperately need to uninstall adobe reader from my Mac book air. I sent adobe reader to trash and afterwards look for internet plugs in  library but this folder is empty in my library. Can anybody help me?

    I looked for plugs in in my library but the folder internet plugs in is empty

  • Contact name not showing in call/sms log even when I call/sms from my address book.

    Two things have changed on my phone recently.
    1. I ran the latest update 4.3.2
    2. My phone was not showing all the contacts in my address book that is in my Mobile Me account. Mobile me had 166 contacts. The iPhone 4 had 136. I I unchecked the syncing of my contacts on my phone. This removed all the contacts from my phone. Then I check the syncing options again. All 166 appeared on the phone.
    I'm not sure which of the two caused the issue but now anytime someone who calls their name does not appear on the display or log, just their number. I can even call people from my address book and the display shows that I am calling them with their name and photo on display. However, in the call log the name does not show just their number.  This applies for text messages. I send a message directly from within the contact card in the address book and in my text log it shows only the number and not the name.
    I've turned the phone off and on a couple of times.
    I would appreciate any advice.
    Cheers

    Thanks iraghib,
    In the end I reset my phone to factory settings. I created a back up of my address book and ical. Reset the phone and did a sync again. This fixed it all. I didn't need to use the backups but is was nice to know they were there. I felt entering the various passwords for all my installed apps was a much better deal than adding the international area code to the 166 contacts I have in my address book.
    Good luck. And thanks for the post.

  • Hi I've a big problem with adobe acrobat reader XI pro and I hope you can help me. The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reade

    Hi
    I've a big problem with adobe acrobat reader XI pro and I hope you can help me.
    The problem is; when I past copied text from some pdf books (not all of them) it past symbols only! wherever I past it! and even if I coped that text from another pdf reader (adobe pdf reader, internet browsers, ...etc.).
    This problem started to happen since yesterday when I installed adobe acrobat reader XI pro to try it before I buy it, and before that when I was using the free adobe pdf reader I was totally able to copy any text from any pdf and past it anywhere with nothing wrong.
    What can I do?
    thank you a lot.

    There is no product called Adobe Acrobat Reader Pro. There is
    - Adobe Acrobat Pro ($$)
    - Adobe Reader (free)
    Which do you have? And are you a programmer?

  • I am using Mail with OS 10.9.1...I used to be able to drag and drop contact addresses from my address book to an e-mail header.  Now I have to type all the names and can't drag and drop.  Is there a setting for this?  Thanks!

    I am using Mail with OS 10.9.1.  I used to be able drag and drop names from my address book into the address header, but can no longer do that.  I now have to type each name in.  Does anyone know if there is a setting for this or is it a feature of the updated software?  Thanks for any info!

    Yes, that appears how Mavericks works right now. However, you can open the Address Panel, select all your contacts, then click the To (or CC, or Bcc) buttons to move the selection to the address field.
    If it is not already in the Toolbar, right-click on the Toolbar and select Customize Toolbar…
    Then, drag the address panel up to wherever you want it.
    You may also want to add it to the New Message window in the same way.

  • How can I delete files from My Mac Book Pro safely to create more space?

    Hi,
    I need to delete files from my Mac Book Pro and I am not sure how to do it safely without affecting my computers drivers or operations.
    In my Finder - All Files Section there are certain files in the Preview, marked as "PNG Image", Window Image, GIF image, XLM. when I look at them they seem scripted or sections of an image. How do I know which files are safe to remove
    I seem to find a lot of duplicated files - is there a way of stopping this from happening?
    Thanks from a little frustrated Mac Book user.

    Welcome to Apple Support Communities
    Transfer them to an external disk formatted in "MS-DOS (FAT)" with Disk Utility > http://pondini.org/OSX/DU1.html
    If you have the pictures in iPhoto, choose them with the Command key, go to File menu (on the menu bar) > Export, and copy them to the external disk. Then, connect your external disk to the PC and move them.
    If you have the pictures in Finder, steps are the same, but in this case, you will have to drag the pictures you chose to the external disk that you can find in the Finder sidebar, under "Devices"

  • How can I do to transfer all iTunes library from my Mac book Pro to Time capsule without to lost the alphabetic sequence of songs

    How can I do to transfer all iTunes library from my Mac book Pro to Time capsule without to lost the alphabetic sequence of songs & artists? What is the correct way to transfer my 3000 songs to Time capsule, to free the memory of my Mac? Thanks a lot. Carlo Molinari (Rome - Italy)

    How can I do to transfer all iTunes library from my Mac book Pro to Time capsule without to lost the alphabetic sequence of songs & artists? What is the correct way to transfer my 3000 songs to Time capsule, to free the memory of my Mac?
    The following are the basic steps to transfer your iTunes Media folder from your MacBook Pro to the Time Capsule (TC). Note: You will leave the iTunes Library, and its associated files, on the MacBook Pro as you will only be moving the media files.
    Be sure to shutdown iTunes before starting.
    Next, move the "iTunes Music" folder, located in ~/Music/iTunes/, to wherever you want on your TC's internal hard drive. Remember to leave the Album Artwork folder, as well as the three individual library files where they are on the MacBook Pro.
    Wait a while. If you have a large library, this will take a bit of time.
    Once the iTunes Media folder has been transferred, open iTunes. Note: It will still be looking at your local iTunes Library on the MBP. As such it will think that the iTunes Media folder is still on the MBP as well. However, we just relocated it to the TC. If you attempt to select any song, you will get an error that the song is "missing." Not to worry, we will correct this in the next step.
    We need to tell iTunes the media has moved to the TC's internal HDD. To change where iTunes "looks" for the media, open iTunes and go to the Advanced > General tab and use the "Change..." button to tell it where your new "iTunes Music" library is located.
    Once this is done iTunes will likely pop up a progress window telling you that it's re-analyzing your library. Let it complete this step.
    As a final check to make sure everything when as planned, click on any library file from within iTunes and press cmd + i (or View > Get Info). At the bottom of the Summary tab in that window is a "Where:" section that tells you the actual file path to that piece of media; be sure that path begins with the name of your TC's drive, and not "Macintosh HD."

  • Moving pages from one iphoto book to another iphoto book

    I have hit the 100 page maximum in a book I am making of recent travels. I'd like to copy and paste pages from this book into a new book so that I have volumes I and II. Is there a way to move pages from one book to another without simply re-creating them? Thanks!

    Only thing I can think of is you can duplicate the whole book and then delete the pages you don't want from the new book. I'm pretty sure there's no way to copy pages from one book to another existing book.

  • How do you select multiple emails from the contacts book.

    Using 10.8.4. I would like to use mail and select multiple email address' from the contacts book to send the same message to multiple persons. I thought I used to be able to select more than one at a time from my contacts book. Am I crazy or did they change the way it works from the previous version of software.
    Or, could you go to the contacts book and email from there. Either way it seems like it was easy to do and now I have to select one at a time and keep going back to the contacts/address book for another name.

    Hi shelereric,
    Once you open a new message, you should be able to just start typing the first letters of the contact's name, and Mail should give you a dropdown to select from:
    So, you should not have to go back and forth between your contacts and mail....anyone in your address book should show up on the dropdown as well as anyone you have received emails from or sent emails to even if they are not in your contacts....
    Is that not what is happening for you? Are you using the Mail app on the Mac?
    Cheers,
    GB

  • How can I remove iCloud from my Mac Book and iPad and Mac Book Air and then just reload back on the MB Air and iPad only?

    How can I remove iCloud from my Mac Book and iPad and Mac Book Air and then just reload back on the MB Air and iPad only, which have a different user with a separate Apple ID?

    You have quite muddied up the waters, I'm afraid. Assuming you now have a single GUID partition formatted Mac OS Extended, Journaled, you should try reinstalling Lion:
    Reinstalling Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • How do I transfer photos in iPhoto from my Mac Book to my iMac?

    How do I transfer photos in iPhoto from my Mac Book to my iMac?

    Depends on exactly what you want to transfer:
    The Original files: Export from iPhoto on the MacBook (File -> Export, set the kind to Original) and copy the files to the iMac. Then import to the Library on the iMac
    The Edited files: Export from iPhoto on the MacBook (File -> Export, set the kind to Jpeg or tiff, note the options for adding metadata to the export) and copy the files to the iMac. Then import to the Library on the iMac
    Both and all the Metadata: Link the two Macs together and use  iPhoto Library Manager
    Regards
    TD

  • HOW CAN I RESTORE MY ITUNES BACKUP FROM MY MAC BOOK TO MY DESKTOP MAC?

    HOW CAN I RESTORE MY ITUNES IPHONE BACKUP FROM MY MAC BOOK TO MY DESKTOP MAC? THE REASON IS BECAUSE I HAVE TEXTFREE TEXT MESSAGES THAT I NEED FOR MY ATTORNEY AND WHEN I RESTORE IT FROM MY MACBOOK IT DOESNT INSTALL THE TEXTFREE BECAUSE I HAD DELETED ALL MY APPS IN ITUNES FROM IT. I HAVE ALL THE APPS ON MY DESKTOP MAC BUT I NEED TO KNOW HOW TO EXTRACT ONLY THE BACKUPS FROM THE MACBOOK AND IMPORT TO MY MAC DESKTOP. THE DESKTOP MAC IS THE ONE THAT HAS ALL OF MY LATEST BACKUPS. PLEASE SOMEONE HELP IF YOU KNOW THE ANSWER. THANKYOU

    Easy. Copy it from the old Mac to the new one.
    There are a variety of techniques including Setup Assistant (as soon as you get your new MacBook Air, it will ask you if you want to transfer information from another computer), Migration Assistant (if you elect to transfer information later), enabling file sharing between the two computers, or copying your music to a flash drive or other storage device followed by importing it to iTunes.
    iTunes: How to move your music from one computer to another
    Once your music library and everything else you want to transfer from the MacBook Pro resides on the new MBA, sync your iPod to the MBA. Sync the iPhone too when you get it, and they will both have identical iTunes music libraries.

Maybe you are looking for

  • Unable to send report output to printer when using RUN_REPORT_OBJECT in 10g

    Hello All, When I try to send my report output to a file from my form(10g), I get 'FRM-41213: Unable to connect to report server'. I can sucessfully send my report to printer when I set the REPORT_DESTYPE to 'PRINTER'.Here is the code from my when-bu

  • File Upload File Renaming

    I was wondering if anyone knows how to set up a trigger to automatically rename a file on upload to change spaces into underscores using DToolbox image and resize feature. An example is from "My picture.jpg" to "My_picture.jpg". I also wonder if this

  • All of my bookmarks on my IPad were gone this morning!

    I don't know what if anything I did. Will this effect my Mac and IPhone? What can I do to recover them?

  • Processor Difficulties

    Hello all, I am using: PowerBook G4 (ver. 2.1), OSX 10.2.8, 800 MHz, 512MB, 40G HD with approx. 28G available. From time to time, my processor seems to be running some functions that cause my system to run much slower - as a matter of fact, it won't

  • How do I open slide show in Elements 7.0

    when I click on slide show the organizer loads and then it tries to load slide show but all I get is a warnig from IE that slide show can't load and then it quits loading and freezes the organizer so that I need to close it through the task manager.