Thursday, May 29, 2008

out.println("<script language=\"javascript\">");
out.println("function disableField()");
out.println("{");
String x="";
out.println("<%x=%>document.form1.usern.value;");
out.println("document.form1.pass.value="+x+";");
out.println("}");
out.println("</script>");

This is my code.. plss help me T_T

what is it?
do i need it?
and will it conflict with any other apps like adobe or java?
windows update says it is available and i am considering installing it.

import java.util.Vector;

public Hand() {
hand = new Vector();
}

public void sortBySuit() {
Vector newHand = new Vector();
while (hand.size() > 0) {
int pos = 0;
Card c = (Card)hand.elementAt(0);
for (int i = 1; i < hand.size(); i++) {
Card c1 = (Card)hand.elementAt(i);
if ( c1.getSuit() < c.getSuit() ||
(c1.getSuit() == c.getSuit() && c1.getValue() < c.getValue()) ) {
pos = i;
c = c1;
}
}
hand.removeElementAt(pos);
newHand.addElement(c);
}
hand = newHand;
}
public void sortByValue() {
Vector newHand = new Vector();
while (hand.size() > 0) {
int pos = 0;
Card c = (Card)hand.elementAt(0);
for (int i = 1; i < hand.size(); i++) {
Card c1 = (Card)hand.elementAt(i);
if ( c1.getValue() < c.getValue() ||
Card c1 = (Card)hand.elementAt(i);
if ( c1.getValue() < c.getValue() ||
(c1.getValue() == c.getValue() && c1.getSuit() < c.getSuit()) ) {
pos = i;
c = c1;
hand.removeElementAt(pos);
newHand.addElement(c);
}
hand = newHand;
This is part of my code. How would you change the vectors into arrays?? It d be better if you could also give me an example... Thanks!!

In my main class is there a way for me to declare- but not define an object for a custom class I made? I want to be able to make the object differently for certain situations using methods. Since the methods have separate variables and objects- I would need to have a global object declaration- right?

It ll give me an error unless I have static after private. Is it doing right? Can I still manipulate the object from any method in my main class?

which allows you to add and remove peoples details- such as their names- phone numbers- and addresses?

if you d rather you can send my an email- which is trevman75@yahoo.com

Consider this statement for computing the average of x- y- and z.
*
double average = x + y + z / 3;

Which of the following statements is correct?

A) The code always computes the correct average.

B) The code works correctly provided x- y- and z are variables of type double

C) The code works correctly provided x- y- and z are variables of type int

D) The code only gives the right answer when x = -y


Won t it always give the wrong average? because its missing the ( ) around the numbers it needs to add?
Like:

double average = (x + y + z) / 3;

No comments: