100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSE 2221 final review £7.16   Add to cart

Exam (elaborations)

CSE 2221 final review

 5 views  0 purchase

CSE 2221 final review

Preview 2 out of 8  pages

  • June 17, 2024
  • 8
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
All documents for this subject (10)
avatar-seller
denicetho
CSE 2221 final review

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

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 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 denicetho. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

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

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79271 documents were sold in the last 30 days

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

Start selling
£7.16
  • (0)
  Add to cart