View Single Post
Old 11-22-2004, 03:33 PM   #11 (permalink)
Crow T. Robot
Registered User
 
Join Date: Nov 2004
Posts: 14
Crow T. Robot is on a distinguished road
Quote:
Originally Posted by Belisarius
JDBC is pretty easy, but I haven't done a plain old connection in a while (been using database connection pools for some time).

You need to download the JDBC driver for whatever database it is you're using, and include it in you classpath.

Sun has a JDBC tutorial online here. Skip the bits about setting up a database and go right to chapter 3, "Establishing a Connection". Let me know if you need help with anything.
Ugh. Turns out I can just do some of the SELECT and whatever other operations I have to do in a word document, and not as an actual program.

Here's the recently revised palindrone program I have.

Code:
import java.util.Stack;
import java.awt.*;
import javax.swing.*;

public class Lab6
{
	

	//ask user for a string
	public Lab6()
	
	//declare a string for user input
	private String string;

	//create stack 
	Stack stack=new Stack();
	
	{
	string=JOptionPane.ShowInputDialog("Enter a string: ");
	}
	
	//add object to stack
	stack.push(string);

	//remove object from stack
	stack.pop(string);
	string=new String string1
	
	//compare characters in string for a palindrone
	public static void main(String args[])
	if (string=string1)
	{
		JOptionPane.ShowMessageDialog("This is a palindrone.");
	}
	
	else
	{
		JOptionPane.ShowMessageDialog("This is not a palindrone.");
	}
}
Crow T. Robot is offline   Reply With Quote