If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

could someone check over these ansers?

Im taking a intro to alogorithm design class. I was going over my study sheet for my first exam and just wanted to make sure my answers were correct before I study something that was wrong anyone have any input/suggestions/corrections i'd really appreciate it

That generally looks ok so here are some random comments. Some of the problems may be a bit tricky, e.g. the difference between a String reference and a String object. In one case the teacher may be looking for

String greeting = new String("hello friend");

rather than a simple initialization assignment.

Also keep in mind that object names begin with a lower case letter while class names are caplitalized. This is not a requirement of the compiler but it *is* the OO standard way of doing things. So A and B aren't really good names.

What if you didn't know ahead of time that Mississippi had exactly two occurances of "ssi"? That makes for a more "interesting" problem.

Also, you will want to add some spaces in your string concatenation. Otherwise, it will look like this: "The product of2and3is5". You may want to use println instead of print as it will automatically place a newline character at the end of the string.