syntax for main method is - ANS-public static void main(String[] args)
Java byte code is saved in a - ANS-The Java compiler checks the source code of
a program in a .java file; if and only if there are
no compile-time errors, it generates bytecode
for that program and saves it in a .class file
define a constant int of 3 in java - ANS-final int THREE = 3;
print 505 in a console adding 500 and 5 - ANS-out.println(500+5);
Root node of an RSS 2.0 feed - ANS-The root node is an rss node with a version
attribute whose value is "2.0"
T/F Is there a channel node as a child of the root? - ANS-True
What is required in the child nodes of the channel node? - ANS-title,link,description
item node in RSS 2.0 must have what children? - ANS-a title or description node
why is n % 2 == 1 not an appropriate way to determine if an int is false? what is an
appropriate way? - ANS-because odd numbers.... n % 2 != 0
What common objects are immutable in java? What does this mean and include an
example. - ANS-String and Integer....
public void exampleInt(int y){
y = 2;
}
public static void main(String [] args){
int x = 5;
// x has value 5 at this point
example(x);
// x still has the value 5 after the call i.e. isn't 2
}
, whereas
public void exampleNN(NaturalNumber y){
y.add(new NaturalNumber1L(2));
}
public static void main(String [] args){
NaturalNumber x = new NaturalNumber1L(2);
// x has value 2 at this point
example(x);
// x now has a value of 4
}
List the parameter modes - ANS-1. Restores
2.Clears
3.Updates
4.Replaces
Default parameter mode? - ANS-Restores
Define restore parameter mode. - ANS-Keeps value what it was inputed
Define update parameter mode. - ANS-depends on incoming value
Define replace parameter mode. - ANS-but the method's behavior does not
depend on its incoming value
Define clears parameter mode. - ANS-initial value of the object (NaturalNumber is 0)
What modes indicate that the parameter can change
value due to the method. - ANS-replaces and updates
if n is null and n.copyFrom(new NaturalNumber1L(2)) is called what will the value of n
be? - ANS-Error! can not copy to a null point
interval halving technique - ANS-!!!!!!!!!
Theorem for recursion - ANS-
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 denicetho. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.30. You're not tied to anything after your purchase.