Definition 1 of 61
a software bundle of related state and behavior. Often used to model the real-world _______ that
you find in everyday life.
How to Create an Object.
The Color of an Object.
A Physical Object Found in Nature.
What Is an Object?
Term 2 of 61
What is an API?
Application Programming Interface. A package obtained from the huge class library
offered by the Java platform.
A type of computer virus that targets programming interfaces.
A method for creating animated pixel images.
An algorithm for solving mathematical equations.
,Term 3 of 61
What is a Class Variable?
Whenever a variable has the keyword static attached to it. It means that every object of that
class will share the same value for that variable.
Hiding internal data from the outside world, and accessing it only through publicly exposed
methods is known as data ___.
provides additional information about an element. normally specified in the start tag.
Allows you to use the same method name and accept different parameters. For example,
you can use the add method to add two integers, or two doubles.
Term 4 of 61
Why would you use the number object over primitive data types?
1. Declaration: start by declaring the object type as well as the variable name
2. Instantiation: Use the NEW keyword to instantiate the new object
3. Initialize: Use a call to the objects constructor that will initialize the object
You can use the format method in the PrintStream Class. Use this if you want to format a
string containing numbers for output.
EX: System.out.format()
1. You can use it for an argument for a method that expects an object
2. To use Constants defined by the class
3. Use class methods for converting values to and from other primitive data types
1. Provide access modifiers
2. Provide return type (What kind of data will the method return)
3. Provide the method name
4. Provide parameter list in parentheses
5. Provided Exception list where applicable
6. Provide a method body
, Term 5 of 61
How do you convert Strings to Numbers?
Each of the Number subclasses provide a method called valueOf that will convert a string
to an object of that type.
Example: Intiger.valueOf()
Multiple methods:
Strings s = String.valueOf(x)
Preferred:
String s2 = Intiger.toString(x)
Makes things immutable in java. Examples: Variables cannot be changed once instantiated.
Methods cannot be overwritten. Classes cannot be extended.
Whenever a variable has the keyword static attached to it. It means that every object of that
class will share the same value for that variable.
Term 6 of 61
What is the clone() method?
A method that deletes the object.
A method that renames the object.
Provided by the Object class, a method that creates a copy of the object.
A method that moves the object to a different location.
The benefits of buying summaries with Stuvia:
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
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
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 stuuviaa. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $12.99. You're not tied to anything after your purchase.