100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CMSC 132 TEST WITH VERIFIED ANSWERS RATED A+. $13.49   Add to cart

Exam (elaborations)

CMSC 132 TEST WITH VERIFIED ANSWERS RATED A+.

 6 views  0 purchase
  • Course
  • CMSC
  • Institution
  • CMSC

CMSC 132 TEST WITH VERIFIED ANSWERS RATED A+.

Preview 2 out of 8  pages

  • October 18, 2024
  • 8
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CMSC
  • CMSC
avatar-seller
HIGRADES
CMSC 132 TEST WITH VERIFIED
ANSWERS RATED A+




Classes Ncan Nonly Nextend Nmore Nthan None Nother Nclass Nif Nat Nleast None Nof
Nthose Nclasses Nis Nan Nabstract Nclass. N- N Ncorrect Nanswer-False N- Na NClass Ncan
Nnever Nextend Nmore Nthan None Nclass.


t/f Nstatic Nmethods Ncannot Nbe Noverridden N- N Ncorrect Nanswer-true- Nstatic
Nmethods Ncan Nnot Nbe Noverridden


Can Na Nstatic Nnested Nclass Naccess Nnonstatic Nvariables Nof Nthe Nouter Nclass? N- N
Ncorrect Nanswer-Yes, Nthrough Nan Nobject Nreference


t/f Nif Nthere Nis Nanything Ninside Nthe Nclass Nthat Nis Ndeclared Nto Nbe Ntype NT, Nonly
Nmethods Nfrom Nthe NObject Nclass Ncan Nbe Ncalled Non Nit N- N Ncorrect Nanswer-
True- Nonly NObject Nmethods Ncan Nbe Ncalled Non NT

Can Nan Ninner Nclass Nbe Nseen Noutside Nof Nthe Nouter Nclass? N- N Ncorrect Nanswer-
No, Nthe Ninner Nclass Ncan Nonly Nbe Nseen Nby Nthe Nouter Nclass

When Ndo Nnonstatic Nfields Nof Nan Nobject Ncome Ninto Nexistence N- N Ncorrect
Nanswer-When Nnew Nis Ncalled


What Nare Nthe Ntwo Nadvantages Nof Ngenerics N- N Ncorrect Nanswer-1. NSome Nerrors
Nwill Nbe Ndetected Nat Ncompilation Nrather Nthan Nruntime
2. Nyou Ndon't Nhave Nto Nexplicitly Ncast Nwhen Nreturning Na Nvalue

Downcasting Ncan Nbe Ndone Nimplicitly. N- N Ncorrect Nanswer-False N- Nit Nmust Nbe
Ndone Nexplicitly Nor Nyour Ncode Nwill Nnot Ncompile.


"Sideways" Ncasting Nis Nnever Nallowed N- N Ncorrect Nanswer-True

, 'super.super' Nwill Nrefer Nto Nthe Ncurrent Nobject, Ntreating Nit Nas Nan Ninstance Nof
Nthe Nparent Nof Nthe Nparent Nof Nthe Ncurrent Nclass. N- N Ncorrect Nanswer-True. NFor
Nexample, Nif Nclass NC Nextends Nclass NB, Nwhich Nextends Nclass NA, Nthen Ncalling
N"super.super.toString()" Nfrom Nwithin Nclass NC Nwill Nreturn Nthe Nresult Nof NA's
NtoString Nmethod.


Constructors Nin Nsubclasses Nmust Ndirectly Ninvoke Nthe Nconstructors Nof Nevery
Nsingle Nparent Nclass Nbefore Ninitializing Nthe Ninstance Nvariables Nunique Nto Nthat
Nsubclass. N- N Ncorrect Nanswer-False N- Nusually, Na Nsingle Ncall Nto Nthe
Nconstructor Nof Nthe Nimmediate Nsuperclass Nis Nneeded, Nhowever. NThis Nis Ndone
Nwith Nthe Nkeyword N'super' Nand Nmust Nbe Nthe Nfirst Nline Nin Nthe Nconstructor.


. NAssume Nthere Nis Na Nmethod Nnamed Nfoo Nin Na Nsuperclass NA, Nwhich Nhas
Nbeen Noverridden Nin NB N(a Nsubclass Nof NA). NIf Nsuper.foo() Nis Ncalled Nfrom
Nwithin Nclass NB, Nit Nwill Nrun Nthe Nfoo() Nmethod Nfrom Nclass NA, Nbut Nif Nfoo() Nis
Ncalled Nfrom Nwithin Nclass NB, Nit Nwill Nrun Nthe Nfoo() Nmethod Nfrom Nclass NB. N- N
Ncorrect Nanswer-True


Every Nclass Nis Na Nsubclass Nof NObject. N- N Ncorrect Nanswer-True N- Nnote Nthat
Nthis Nquestion Ndoesn't Nnecessarily Nmean Nthat Nthe Nclass Nis NONLY Na Nsubclass
Nof NObject, Nbut Nevery Nclass Ndoes Ninherit Nfrom NObject, Neither Ndirectly Nor
Nindirectly.


When Nyou Noverride Na Nmethod, Nyou Nare Nallowed Nto Nchange Nthe Nnumber Nof
Narguments. N- N Ncorrect Nanswer-False N- Nthe Nmethod Nsignature Nmust Nbe
Nexactly Nthe Nsame


When Nyou Noverload Na Nmethod, Nyou Nare Nallowed Nto Nchange Nthe Nnumber Nof
Narguments. N- N Ncorrect Nanswer-True


To Nsort Nan NArrayList Nof NMyObject Nobjects Nusing NCollections.sort, NMyObject
Nmust Nhave Nan Nimplementation Nof Nthe NcompareTo Nmethod Ndefined Nin Nthe
Nclass. N- N Ncorrect Nanswer-False N- Nyou Ncan Nalso Npass Nin Na NComparator Nwith
Nthe Ncompare Nmethod.


Unchecked Nexceptions Nare Ngenerally Nfor Ncommon Nexceptions Nthat Nneed Nto Nbe
Naccounted Nfor. N- N Ncorrect Nanswer-False N- Nthis Nis Ndescribing Nchecked
Nexceptions, Nnot Nunchecked Nexceptions.


An Nabstract Nclass Nmust Ninclude Nat Nleast None Nabstract Nmethod. N- N Ncorrect
Nanswer-False


An Nabstract Nclass Ncan Ncontain Ninstance Nvariables Nand Nconstructors. N- N
Ncorrect Nanswer-True


You Ncan Nimplement Nmore Nthan None Nabstract Nclass. N- N Ncorrect Nanswer-False
N- NYou Ncan NEXTEND Nonly None Nabstract Nclass.


An Nabstract Nclass Ncan Nbe Ninstantiated. N- N Ncorrect Nanswer-False

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller HIGRADES. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $13.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79223 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$13.49
  • (0)
  Add to cart