<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title><![CDATA[Latest topics for the forum "Java Programming"]]></title>
		<link>http://forums.hotjoe.com/forums/show/3.page</link>
		<description><![CDATA[The newest discussed topics in the forum "Java Programming"]]></description>
		<generator>JForum - http://www.jforum.net</generator>
			<item>
				<title>Confusion on getting the value from a method in another method</title>
				<description><![CDATA[ So let's say I have a method that's scanning in the next word of a file from a scanner called (in) in the main method and just returning the String back to the main method. (I'm just trying to figure out how to get return values back before I get clever doing things in the other method.)   When it comes back to the main method.  I want to assign the returned value to a variable and print it out.<br /> public static String othermethod (Scanner in)<br />  {<br /> String word = in.next ();<br /> return word;<br /> }<br /> public static void main (String[] args)<br /> {<br /> // bunch of coding bringing in a scanner and reading the first word.<br /> <br /> othermethod (in);  // calling the other method which is to read the string and bring it back<br /> <br /> // HOW DO I GET THE VALUE THE STRING IS RETURNING?<br /> <br /> // My thought is to do something like...<br /> <br /> String returnedvalue = othermethod();<br /> System.out.println (returnedvalue);<br /> }<br /> // but it doesn't work with empty parameters and I'm not sure what I should be putting in the parameters.<br /> Most of the things I've tried tell me that the String from my other method is not applicable to the arguments () <br /> <br /> Can anyone help me to understand this concept?<br /> ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3222/4510.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3222/4510.page</link>
				<pubDate><![CDATA[Sat, 4 Feb 2012 12:48:48]]> GMT</pubDate>
				<author><![CDATA[ Judy]]></author>
			</item>
			<item>
				<title>World Generation :)</title>
				<description><![CDATA[ Hello,<br /> I am back,<br /> <br /> I have a decent working of Java, simple apps are no problem for me, and as its a hobby I don't do anything too serious with it.<br /> However,<br /> I want to create something similar to `the game of life,' but with countrys.<br /> Its going to be a grand strat game, that can be played in an hour or less.<br /> <br /> I know its alot to program but I am here to learn aha.<br /> <br /> I would love some advice on the following:<br /> I am trying to generate the landscape in the following way - <br /> I create an array , one for width, and one for height.<br /> These both start out empty, here is an example I use to populate the width list.<br /> <br /> [code]<br /> 	public void generateWidth(){<br /> 			width.add(arrayList1,randomInt2);<br /> 			arrayList1 = arrayList1++;<br /> 			int randomInt2 = randomGenerator.nextInt(10);<br /> 			System.out.println("The island is  " + randomInt + " long in pixels");<br /> 			System.out.println("The Random Number was " + randomInt2);<br /> 			<br /> 	}<br /> [/code]<br /> <br /> Using the generateWidth method, in the class I am able to fill the list to a random number, and then populate the the contents with another random number.<br /> So for example, a reading might be `index = 4, value = 9,' to me that would translate as being 4 across from the starting point , and be a piece of rocky landscape.<br /> <br /> <br /> How can I do something like this?]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3216/4503.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3216/4503.page</link>
				<pubDate><![CDATA[Sun, 29 Jan 2012 13:49:43]]> GMT</pubDate>
				<author><![CDATA[ AllanOcelot]]></author>
			</item>
			<item>
				<title>TCP/IP CLient-Server Chat Program</title>
				<description><![CDATA[ Hi Guys,<br /> <br /> I'm quite new here and am new to Java Programming, but i could use some help. I have a client-serve chat program and have almost finished it to my standards however I am trying to enable the server to accept multiple clients, how would i do this? what do i have to add or change on the server to allow this?<br /> <br /> Thanks<br /> <br /> Server<br /> [code]<br /> import java.awt.*;<br /> import java.net.*;<br /> import java.awt.*;          <br /> import java.awt.event.*;    <br /> import javax.swing.*;       <br /> import javax.swing.event.*;<br /> import java.io.*;<br /> <br /> public class SwingChatServer extends SwingChatGUI<br /> {<br /> 	public String outline;<br />     public String fromClient, s = "";<br /> 	PrintWriter out;<br /> 	BufferedReader in;<br /> 	BufferedReader stdin;<br /> 	String inputLine, outputLine;<br /> 	public ButtonHandler bHandler = new ButtonHandler();<br />     <br /> 	public SwingChatServer (String title)<br /> 	{<br /> 		super (title);<br /> 		bHandler = new ButtonHandler ();<br /> 		sendButton.addActionListener (bHandler);<br /> 	}<br /> <br /> 	private class ButtonHandler implements ActionListener<br /> 	{<br /> 		public void actionPerformed (ActionEvent event)<br /> 		{<br /> 			outputLine = txArea.getText ();<br /> 			System.out.println (&quot;Server :&gt; &quot; + outputLine);<br /> 			out.println (outputLine);<br /> 			outline = txArea.getText ();<br /> 			s = &quot;Server :&gt;&quot;+ outline+&quot;\n&quot;;<br /> 			rxArea.append(s);<br /> 			txArea.setText("");<br />     	}<br /> 	}<br />     <br /> 	public void run () throws IOException<br /> 	{<br /> 		ServerSocket serverSocket = null;<br />        <br /> 		try<br />         {<br />         	serverSocket = new ServerSocket (4444);<br />         }<br />         catch (IOException e)<br />         {<br />         	System.err.println ("Could not listen on port: 4444.");<br />         	System.exit (1);<br />         }<br /> <br />         Socket clientSocket = null;<br />         try<br />         {<br />         	clientSocket = serverSocket.accept ();<br />         }<br />         catch (IOException e)<br />         {<br />         	System.err.println ("Accept failed.");<br />         	System.exit(1);<br />         }<br /> <br />     	out = new PrintWriter (clientSocket.getOutputStream (), true);<br />     	in = new BufferedReader (new InputStreamReader (clientSocket.getInputStream ()));<br />     	//stdin = new BufferedReader (new InputStreamReader (System.in));<br /> <br />         out.println ("Welcome to the Chat Server");<br /> <br /> 		<br /> 		while ((fromClient = in.readLine ()) != null) //allows a new line to not over write the chat<br /> 		{<br /> 			System.out.println (&quot;Client :&gt; &quot; + fromClient);<br /> 			s = &quot;Client :&gt;&quot; + fromClient + &quot;\n&quot;;<br /> 			rxArea.append (s);<br /> 			<br /> 			if (fromClient.equals ("Bye"))System.exit(0);<br /> <br /> 		}<br /> 		<br />         out.close();<br />         in.close();<br />         clientSocket.close();<br />         serverSocket.close();<br />     }<br /> <br /> 	public static void main(String[] args) //throws IOException<br />     {<br /> <br />  		SwingChatServer frame = new SwingChatServer ("Chat Server Program");<br /> 		<br /> 		frame.pack ();<br /> 		frame.setVisible(true);<br /> 		frame.setIconImage(Toolkit.getDefaultToolkit().getImage("chat.jpg"));<br />         frame.setLocationRelativeTo(null);<br />         frame.setDefaultCloseOperation(EXIT_ON_CLOSE);<br /> 		try<br /> 		{<br /> 			frame.run ();<br /> 		}<br /> 		catch (IOException e)<br /> 		{<br /> 			System.err.println("Couldn't get I/O for the connection to: 194.81.104.118!\n");<br /> 			System.exit(1);<br /> 		}<br /> <br />     } <br /> }<br /> <br /> [/code]]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3212/4492.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3212/4492.page</link>
				<pubDate><![CDATA[Thu, 12 Jan 2012 10:00:46]]> GMT</pubDate>
				<author><![CDATA[ thornt5748]]></author>
			</item>
			<item>
				<title>MyHTTPClient.java help please</title>
				<description><![CDATA[ I'm not sure if this is where i should be asking but i'm trying to write a HTTP Client class which is meant to roughly do the following but i don't even know where to begin. any help will be greatly appreciated<br /> <br /> • Get web server host and port from request <br /> • Get the resource path on web server from the request <br /> • Get request parameter name/value pairs <br /> • Construct post request body <br /> • Get the length of the post request body <br /> • Open a connection to the web server (avaya/~STUDENTID) <br /> • Get socket input stream and wrap it in a buffered reader so it can be read line-by-line <br /> • Get socket output stream and wrap it in a buffered writer so it can be written to line-by-line <br /> • write the http post request to the web server connection <br /> • create an object to encapsulate the http response data <br /> • Read the http response status line <br /> • Extract the response status code and its description from the http response status line <br /> • Store the response status and description <br /> • If the response status code does not indicate success then raise an exception <br /> • Read the http response headers - terminated by a blank line <br /> • Split response header into a header name and value <br /> • Read the http response body <br /> • Close the connection to the web server <br /> • Return the response <br /> ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3211/4490.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3211/4490.page</link>
				<pubDate><![CDATA[Tue, 10 Jan 2012 11:05:16]]> GMT</pubDate>
				<author><![CDATA[ java1306]]></author>
			</item>
			<item>
				<title>need help with a project</title>
				<description><![CDATA[ I am working on a project and the requirements are getting through a 2d array. The 2d array is a maze with 1s as the way through and 0s as walls. I can get through the maze just fine but then we need to get back through the maze and I keep messing up. We must also get back through the maze the most efficient path and I don't know how to do that. Any help would be greatly appreciated.<br /> <br /> <br /> <br /> import javax.swing.JOptionPane;<br /> <br /> <br /> public class arrayStuff{<br /> <br /> public static void main (String args[]) <br /> {<br /> Moves front = null;<br /> Moves pointer = null;<br /> Moves next = null;<br /> <br /> int i = 0;<br /> int j=0;<br /> <br /> int[][] maze = { {1,1,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,0},//0<br />                  {0,1,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,0},//1<br />                  {1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,1,1,1,1,1,0},//2<br />                  {1,0,1,0,1,1,1,1,1,1,1,1,1,1,0,1,0,0,0,0,0},//3<br />                  {1,0,1,0,0,0,0,0,0,0,0,0,0,1,0,1,0,0,0,0,0},//4<br />                  {1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,0},//5<br />                  {1,0,1,1,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,0},//6<br />                  {1,0,0,0,1,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0},//7<br />                  {1,0,0,1,1,0,0,0,0,0,0,1,0,0,0,1,0,1,1,1,0},//8<br />                  {1,0,0,1,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1},//9<br />                  {1,1,0,1,0,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,1},//10<br />                  {0,1,0,1,0,1,0,0,0,0,0,1,1,1,1,1,0,0,0,0,1},//11<br />                  {1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,0,0,1,1},//12<br />                  {1,0,0,1,0,1,0,1,0,1,1,1,1,1,0,1,0,1,1,1,0},//13<br />                  {1,0,0,0,0,1,0,1,0,1,1,0,0,0,0,1,0,0,0,1,1},//14<br />                  {1,0,1,1,1,1,0,1,0,1,0,0,0,1,1,1,0,1,0,1,1},//15<br />                  {1,0,1,0,0,0,0,1,0,1,1,1,0,1,0,0,0,1,0,1,1},//16<br />                  {1,0,1,1,1,1,1,1,0,1,1,1,0,1,0,0,0,1,1,1,0},//17<br />                  {1,0,0,0,0,0,0,0,0,1,0,0,0,1,1,0,0,1,0,1,1},//18<br />                  {1,1,1,0,1,1,1,0,1,1,1,1,1,1,1,1,1,0,0,0,1},//19<br />                  {1,1,1,1,1,0,1,1,1,0,0,0,0,0,0,0,1,1,0,0,1}};//20<br />                 <br />       <br /> next = robotMove(maze,front, pointer,i,j,next);<br /> moveBack(maze, front,pointer,i,j,next);<br />  <br /> <br /> }<br /> <br /> <br /> <br /> public static Moves robotMove( int[][] maze, Moves front, Moves pointer,int i,int j, Moves next) <br /> {<br /> int robot = maze[0][0];<br /> <br /> <br /> <br /> <br /> while(maze[i][j]!=0&&i+j!=40)<br />       {<br />  <br /> <br />                     if(i&gt;0&&maze[i-1][j]==1)<br />                         {<br />                             robot=maze[i-1][j];<br />                             i=i-1;<br />                     <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                     if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />     <br />                   else if(j&gt;0&& maze[i][j-1]==1)<br />                         {<br />                             robot=maze[i][j-1];<br />                             j=j-1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                 if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 <br />                  else if (i&lt;20&&maze[i+1][j]==1)<br />                         { <br />                             robot=maze[i+1][j];<br />                             i=i+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                         <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                  if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />     <br />                 else if(j&lt;20&&maze[i][j+1]==1)<br />                         {<br />                             robot=maze[i][j+1];<br />                             j=j+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                  if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />     <br />     <br />         <br />                 else if(maze[i][j+1]==2)<br />                         { <br />                             robot=maze[i][j+1];<br />                             j=j+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                 <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                             if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 else if((i&gt;0)&&(maze[i-1][j]==2))<br />                         {<br />                             robot=maze[i-1][j];<br />                             i=i-1;<br />                     <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                     if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />     <br />                 else if(maze[i][j-1]==2)<br />                         {<br />                             robot=maze[i][j-1];<br />                             j=j-1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                 if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 <br />                  else if (maze[i+1][j]==2)<br />                         { <br />                             robot=maze[i+1][j];<br />                             i=i+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                         <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                  if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                         <br />                 else if(maze[i][j+1]==3)<br />                         { <br />                             robot=maze[i][j+1];<br />                             j=j+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                 <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                             if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 else  if(i&gt;0&&maze[i-1][j]==3 )<br />                         {<br />                             robot=maze[i-1][j];<br />                             i=i-1;<br />                     <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                     if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />     <br />                 else if( maze[i][j-1]==3)<br />                         {<br />                             robot=maze[i][j-1];<br />                             j=j-1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                 if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 <br />                  else if (maze[i+1][j]==3)<br />                         { <br />                             robot=maze[i+1][j];<br />                             i=i+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                         <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                  if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                         <br />                 else if(maze[i][j+1]==4)<br />                         { <br />                             robot=maze[i][j+1];<br />                             j=j+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                 <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                             if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 else  if(i&gt;0&&maze[i-1][j]==4 )<br />                         {<br />                             robot=maze[i-1][j];<br />                             i=i-1;<br />                     <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                     if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />     <br />                   else if(j&gt;0&& maze[i][j-1]==4)<br />                         {<br />                             robot=maze[i][j-1];<br />                             j=j-1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                     <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                 if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />                 <br />                  else if (maze[i+1][j]==4)<br />                         { <br />                             robot=maze[i+1][j];<br />                             i=i+1;<br />             <br />                             maze[i][j]=robot+1;<br />             <br />                         <br />                             String text="";<br />                             text=text+i;<br />                             String texts= "";<br />                             texts=texts + j;<br />                             String both = text+""+texts;<br />                             JOptionPane.showMessageDialog(null,both);<br />                             <br />                                  if (front != null)<br />                                         {<br />                                             orderMeth(maze, front,pointer,i,j,next);<br />                                         }<br />                                         <br />                                     else        <br />                                         {  <br />                                             front = new Moves();<br />                                             front.x = i;<br />                                             front.y =j;<br />                                             next = front;<br />                                             String bext="";<br />                                             bext=bext+front.x;<br />                                             JOptionPane.showMessageDialog(null,bext);<br />                                         }<br />                         }<br />        }<br />                     String text = "You have reached the end of the maze";<br />                     JOptionPane.showMessageDialog(null,text);<br />                     return next;<br /> }<br /> <br /> <br /> <br /> <br /> public static void moveBack(int[][] maze ,Moves front, Moves pointer,int i, int j, Moves next)<br />    <br />     {<br />         <br />         String out = "";<br />         <br />         {<br />             while (front!= null)<br />                 {<br />                     <br />                     out = out + front.x + "" + front.y + "\n";<br />                     front = front.link;<br />                 }<br />          JOptionPane.showMessageDialog(null,out);       <br />         }<br />     }<br />     <br />     <br /> public static Moves orderMeth(int[][] maze, Moves front,Moves pointer,int i, int j,Moves next)<br />     {<br />             pointer= new Moves();<br />             pointer.x=i;<br />             pointer.y=j;<br />             next.link= pointer;<br />             next = pointer;<br />             <br />             <br />            <br />             <br />             String out = "";<br />             out = next.x + "" + next.y;<br />             JOptionPane.showMessageDialog(null,out);<br />             <br />              return next;<br />     }<br /> }<br />  ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3209/4487.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3209/4487.page</link>
				<pubDate><![CDATA[Sat, 7 Jan 2012 17:32:02]]> GMT</pubDate>
				<author><![CDATA[ NeedHelp]]></author>
			</item>
			<item>
				<title>Graphics</title>
				<description><![CDATA[ Hi,<br /> <br /> My Java class in school was more of an introduction to the language, and not really that helpful at the end of the year. The class is almost over, and I don't even know the difference between private and public. That must show how "introy" it was.<br /> <br /> Anyway, the main things I want to do is develop games. Obviously I know there are better languages to use for that, but what I'm doing isn't really that complicated. If you get ANY game, regardless of what it's programmed in (look at Minecraft, for example. It's coded in Java.), they have separate folders for stuff like music, images, etc.<br /> <br /> I want to know how to make a game such as a top-down 2D old school dungeon sidescroller, and obviously you can't do that with my current knowledge of Java.<br /> <br /> Anywhere you can point me to that can teach me the following things (obviously I need more, but this is just a "off the top of my head" list):<br /> <br /> [code]<br /> 1: How to develop programs that have images you can make<br /> 2: How to add sound to a program<br /> 3: How to get images/sound/etc from different folders<br /> 4: Other general game programming things<br /> [/code]<br /> <br /> Thanks for any help you can give!]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3208/4484.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3208/4484.page</link>
				<pubDate><![CDATA[Fri, 6 Jan 2012 19:14:33]]> GMT</pubDate>
				<author><![CDATA[ chowbaaron]]></author>
			</item>
			<item>
				<title>delete</title>
				<description><![CDATA[ delete]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3207/4480.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3207/4480.page</link>
				<pubDate><![CDATA[Thu, 5 Jan 2012 03:38:12]]> GMT</pubDate>
				<author><![CDATA[ Zarcon]]></author>
			</item>
			<item>
				<title>Random images with Virtual Max's Puzzlemaker</title>
				<description><![CDATA[ Hi! I'm wondering if there's a way I can use randomizing images with Virtual Max's Puzzlemaker applet. I know others have done it, but they're not willing to share their secrets, apparently. Every time the user refreshes the page, I'd like a new image to come up. I'm not a programmer, though, so I don't know how to do this.<br /> <br /> This is the source code the applet uses:<br /> &lt;APPLET CODEBASE=./&gt;<br />         CODE=puzzlemaker.class <br />         WIDTH=400 <br />         HEIGHT=400&gt;<br /> &lt;PARAM NAME="AUTHOR" VALUE="Virtual_Max (<a class="snap_shots" href="http://come.to/vmax" target="_blank" rel="nofollow">http://come.to/vmax</a>)"&gt;<br /> &lt;PARAM NAME="IMAGE" VALUE="010.png"&gt;<br /> &lt;PARAM NAME="KEY" VALUE="Free Version"&gt;<br /> &lt;PARAM NAME="ROWS" VALUE="8"&gt;<br /> &lt;PARAM NAME="COLS" VALUE="8"&gt;<br /> &lt;PARAM NAME="BGCOLOR" VALUE="fa94a9"&gt;<br /> &lt;PARAM NAME="TEXTCOLOR" VALUE="924c97"&gt;<br /> &lt;PARAM NAME="LINK" VALUE="games_rewards.php"&gt;<br /> &lt;PARAM NAME="TARGET" VALUE="_self"&gt;&lt;/applet&gt;<br /> <br /> Can anyone help? I've tried doing web searches, but I didn't come up with anything.]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3205/4477.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3205/4477.page</link>
				<pubDate><![CDATA[Wed, 28 Dec 2011 13:46:31]]> GMT</pubDate>
				<author><![CDATA[ Kiara]]></author>
			</item>
			<item>
				<title>Need help on a basic matter </title>
				<description><![CDATA[ Hello,<br /> <br /> I'm trying to build a basic java program to test what i know.<br /> So far, it's not going anywhere.. lol <br /> <br /> See my code below, as I have 1 main class called HOUSE, and subclasses called living.. kitchen.. and whatever<br /> I have input variable like lenght and width and trying to "getarea". the result i'm getting is NULL.. and i don'T know why<br /> <br /> Any ideas, and thanks for any support you may provide.<br /> <br /> /**<br /> *<br /> * @author Daniel<br /> */<br /> public class AlexHouse1 {<br /> private static int Height = 12; // The height is the same for all rooms<br /> private static int Lenght;<br /> private static int Width;<br /> private static int floors;<br /> private static int HouseNumber = 33; // The House civic number<br /> private static int HouseRooms = 4; // Number of room into the House<br /> private static int YearConstruction = 2001;<br /> private static String HouseStreet = "My street name"; // The Street name<br /> private static String HouseCity = "Toronto"; // City Name<br /> private static String HouseSize;<br /> int temperature; // It's temperature, but i have not assiged value.<br /> String HouseColor = "yellow"; // Outside color of the house<br /> <br /> <br /> public class AlexHouse1Size {<br /> public int Lenght = 0;<br /> public int Width = 0;<br /> public AlexHouse1Size(int a, int b){<br /> Lenght = a;<br /> Width = b;<br /> }<br /> <br /> <br /> public int getArea() {<br /> return Lenght * Width;<br /> }<br /> AlexHouse1Size HouseSize = new AlexHouse1Size(12,15);<br /> <br /> }<br /> <br /> <br /> <br /> <br /> <br /> <br /> public class LivingRoom extends AlexHouse1 { // Subclaass Living Room<br /> int LivingRoomLenght;<br /> int LivingRoomWidth;<br /> int LivingRoomLHeight = 8;<br /> int LivingRoomSize;<br /> String LivingRoomColor = "beige";<br /> int LivingRoomTemperature;<br /> <br /> }<br /> <br /> <br /> public static void main(String[] args) {<br /> AlexHouse1 House = new AlexHouse1(); // To create AlexHouse "object"<br /> <br /> <br /> <br /> System.out.println("Alex House have a total of " + HouseRooms + " rooms");<br /> System.out.println("and she was built in " + YearConstruction);<br /> System.out.println("The house total height is " + Height);<br /> System.out.println("The house size is " + HouseSize);<br /> }<br /> <br /> } <br /> ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/3203/4468.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/3203/4468.page</link>
				<pubDate><![CDATA[Thu, 15 Dec 2011 08:41:17]]> GMT</pubDate>
				<author><![CDATA[ dan-jr]]></author>
			</item>
			<item>
				<title>Cant get it to work</title>
				<description><![CDATA[ here is my final project for my Java Beginners, i get half of it to work but not the other, can anyone help me out, its due in a few hours.....here is my code, thanks....<br /> <br /> It supposed to receive input and display it as written.........<br /> and perfornm the desire tasks.....<br /> <br /> thank you<br /> <br /> import java.awt.*;<br /> import java.awt.event.ActionEvent;<br /> import java.awt.event.ActionListener;<br /> import javax.swing.*;<br /> import java.text.SimpleDateFormat;<br /> import java.util.Date;<br /> public class FinalProject extends JFrame implements ActionListener<br /> {<br /> 	JLabel textPrompt;<br /> 	JTextArea inputText;<br /> 	JLabel keyPrompt;<br /> 	JTextField inputKey;<br /> 	Container container;<br />  <br /> 	public FinalProject()<br /> 	{<br /> 		super( "Final Project " );<br /> 		JTabbedPane tab = new JTabbedPane();<br />  <br /> 		// constructing the Pool Panel<br />  <br /> 		JPanel p1 = new JPanel();<br /> 		JLabel label4,label5,lable6;<br /> 		final JTextField text4,text5,text6,text13;<br /> 		label4 = new JLabel();<br /> 		label4.setText("Height:");<br /> 		p1.add(label4);<br /> 		text4 = new JTextField(20);<br /> 		p1.add(text4);<br /> 		JLabel space3 = new JLabel("     INCHES     ");<br /> 		p1.add(space3);<br /> 		label5 = new JLabel();<br /> 		label5.setText("Width:");<br /> 		p1.add (label5);<br /> 		text5 = new JTextField(20);<br /> 		p1.add(text5);<br /> 		JLabel space5 = new JLabel("     INCHES     ");<br /> 		p1.add(space5);<br /> 		lable6 = new JLabel();<br /> 		lable6.setText("Depth:");<br /> 		p1.add(lable6);<br /> 		text6 = new JTextField(20);<br /> 		p1.add(text6);<br /> 		JLabel space2 = new JLabel("     INCHES     ");<br /> 		p1.add(space2);<br /> 		JButton button = new JButton("Enter");<br /> 		p1.add(button);<br /> 		tab.addTab( "Pool", null, p1, " Pool" );<br /> 		text13 = new JTextField();<br /> 		p1.add(text13);<br /> 		button.addActionListener(<br />  <br /> 		new ActionListener(){<br /> 			public void actionPerformed(ActionEvent e) {<br /> e.getActionCommand();<br /> 				int length=Integer.parseInt(text4.getText());<br /> 				int width=Integer.parseInt(text5.getText());<br /> 				int depth=Integer.parseInt(text6.getText());<br />  <br /> 				if (e.getActionCommand().equals("Enter")) {<br /> 					int volume = ((length * width) * depth);<br /> 					JOptionPane.showMessageDialog(null, "The Volume is: "+volume," for your pool.", JOptionPane.INFORMATION_MESSAGE);<br /> 				}<br /> 				}<br /> 		});<br /> // constructing the Hot Tube panel<br />  <br /> 		new JLabel("Hot Tube");<br /> 		JPanel p2 = new JPanel();<br /> 		JLabel label7,label8,lable9;<br /> 		final JTextField text7,text8,text9;{<br /> 			label7 = new JLabel();<br /> 			label7.setText("Height:");<br /> 			p2.add(label7);<br /> 			text7 = new JTextField(20);<br /> 			p2.add(text7);<br /> 			JLabel space6 = new JLabel("    INCHES     ");<br /> 			p2.add(space6);<br /> 			label8 = new JLabel();<br /> 			label8.setText("Width:");<br /> 			p2.add(label8);<br /> 			text8 = new JTextField(20);<br /> 			p2.add(text8);<br /> 			JLabel space7 = new JLabel("    INCHES     ");<br /> 			p2.add(space7);<br /> 			lable9 = new JLabel();<br /> 			lable9.setText("Depth:");<br /> 			p2.add(lable9);<br /> 			text9 = new JTextField(20);<br /> 			p2.add(text9);<br /> 			JLabel space8 = new JLabel("    INCHES     ");<br /> 			p2.add(space8);<br /> 			<br /> 			JButton rbutton1 = new JButton ("Round");<br /> 			p2.add(rbutton1);<br />  <br /> 			tab.addTab( "Hot Tube", null, p2, " Hot Tube" );<br /> 			<br /> 			rbutton1.addActionListener(<br />  <br /> 			new ActionListener(){<br /> 				public void actionPerformed(ActionEvent e) {<br /> <br />  <br /> 					int length=Integer.parseInt(text7.getText());<br /> 					int width=Integer.parseInt(text8.getText());<br /> 					int depth=Integer.parseInt(text9.getText());<br />  <br /> 					<br /> 					 if(e.getActionCommand().equals("Round")){<br /> 						int volume1= (((length/2)^2) * depth);<br /> 						JOptionPane.showMessageDialog(null, "The Volume is: "+volume1,"" +<br /> 								"for your round hot tube.", JOptionPane.INFORMATION_MESSAGE);<br /> 					}<br /> 				}<br /> 			});<br /> <br />  <br /> 			new JLabel( " Temperature Change!" );<br /> 			JPanel p3 = new JPanel();<br /> 			JLabel label10;<br /> 			final JTextField text10;<br /> 			label10 = new JLabel();<br /> 			label10.setText("Temperature:");<br /> 			p3.add(label10);<br /> 			text10 = new JTextField(20);<br /> 			p3.add(text10);<br /> 			JButton button3 = new JButton("Enter");<br /> 			p3.add(button3);<br /> 			JCheckBox boxF = new JCheckBox("F");<br /> 			p3.add(boxF);<br /> 			JCheckBox boxC = new JCheckBox("C");<br /> 			p3.add(boxC);<br /> 			tab.addTab( "Temperature Change", null, p3, " Temperature Change" );<br /> 			button3.addActionListener(this);<br /> 			boxF.addActionListener(this);<br /> 			boxC.addActionListener(<br />  <br /> 			new ActionListener(){	<br /> 				public void actionPerformed(ActionEvent e) {<br /> <br /> 					int temperature=Integer.parseInt(text10.getText());<br />  <br /> 					if(e.getActionCommand().equals("C")){<br /> 						int temp = (( temperature* 9)/5+32);<br /> 						JOptionPane.showMessageDialog(null, "Your temperature is changed to: "<br /> 								+temp,"" +<br /> 								"in fahrenheit", JOptionPane.INFORMATION_MESSAGE);<br /> 					}<br /> 					else if(e.getActionCommand().equals("F")){<br /> 						int temp1= (((temperature - 32)/9)*5);<br /> 						JOptionPane.showMessageDialog(null, "Your temperature is changed to: "+temp1,""+<br /> 								"in Celcius.", JOptionPane.INFORMATION_MESSAGE);<br /> 					}<br /> 				}<br /> 			});<br /> // constructing the Customer panel<br />  <br /> 			JPanel p4 = new JPanel();<br /> 			JLabel label1,label2;<br /> 			final JTextField text1,text2;<br /> 			label1 = new JLabel();<br /> 			label1.setText("Name:");<br /> 			p4.add(label1);<br /> 			text1 = new JTextField(20);<br /> 			p4.add(text1);<br /> 			JLabel space = new JLabel("                  ");<br /> 			p4.add(space);<br /> 			label2 = new JLabel();<br /> 			label2.setText("Address:");<br /> 			p4.add(label2);<br /> 			text2 = new JTextField(20);<br /> 			p4.add(text2);<br /> 			JButton button4 = new JButton("Enter");<br /> 			p4.add(button4);<br /> 			tab.addTab( "Customer", null, p4, " Customer" );<br /> 			button4.setActionCommand ("enter");<br />  <br /> 			new ActionListener(){<br /> 				public void actionPerformed(ActionEvent e) {<br /> e.getActionCommand();<br /> 					int Name=Integer.parseInt(text1.getText()) ;<br /> 					int Address=Integer.parseInt(text2.getText());<br /> 					if (e.getActionCommand().equals("Enter")) {	<br /> 						JOptionPane.showMessageDialog(null, "Customer's name is:"+Name,"Their address is:"<br /> 								+Address, JOptionPane.INFORMATION_MESSAGE);<br /> 					}<br /> 				}<br /> 			};<br /> <br />  <br /> 			new JLabel( "General" );<br /> 			JPanel p5 = new JPanel();<br /> 			Date date = new Date();<br /> 			SimpleDateFormat dateformatMMDDYYYY = new SimpleDateFormat("MM/dd/yyyy");<br /> 			new StringBuilder( dateformatMMDDYYYY.format( date ) );<br /> 			JLabel space11 = new JLabel(" ");<br /> 			p5.add(space11);<br /> 			JLabel space12 = new JLabel(" ");<br /> 			p5.add(space12);<br /> 			JLabel space13 = new JLabel(" ");<br /> 			p5.add(space13);<br /> 			JLabel label11;<br /> 			label11 = new JLabel();<br /> 			label11.setText("Today's Date is:");<br /> 			p5.add(label11);	<br /> 			JLabel texta1;<br /> 			texta1 = new JLabel();<br /> 			texta1.setText(dateformatMMDDYYYY.format(date));<br /> 			p5.add(texta1);<br /> 			tab.addTab( "General", null, p5, " Today's Date");<br />  <br /> 			<br />  <br /> 			JPanel p6 = new JPanel();<br /> 			JLabel label3;<br /> 			final JTextField text3;<br /> 			label3 = new JLabel();<br /> 			label3.setText("Manufacture:");<br /> 			p6.add(label3);<br /> 			text3 = new JTextField(20);<br /> 			p6.add(text3);<br /> 			JLabel space1 = new JLabel(" ");<br /> 			p6.add(space1);<br /> 			tab.addTab( "Manufacture", null, p6, " Manufacture" );<br /> 			JButton button6 = new JButton("Enter");<br /> 			p6.add(button6);<br /> 			button6.addActionListener(this);<br /> 			{<br /> 				button6.setActionCommand ("Enter");<br />  <br /> 				new ActionListener(){<br /> 					public void actionPerformed(ActionEvent e) {<br /> e.getActionCommand();<br /> 						int Manufacture=Integer.parseInt(text3.getText()) ;<br />  <br /> 						if (e.getActionCommand().equals("Enter")) {<br /> 							JOptionPane.showMessageDialog(null, "Manufacture's name is:"<br /> 									+Manufacture,"", JOptionPane.INFORMATION_MESSAGE);<br /> 						}<br /> 					}<br /> 				};<br /> <br />  <br /> 				new JLabel("Customer Comments?");<br /> 				JPanel p7 = new JPanel();<br /> 				new JPanel( );<br /> 				textPrompt = new JLabel("Customer comments:");<br /> 				inputText = new JTextArea(5, 15);<br /> 				inputText.setLineWrap(true);<br /> 				inputText.setWrapStyleWord(true);<br />  <br /> //add components to window<br /> 				container = getContentPane();<br /> //use borderlayout to position our two i/o panels<br /> 				container.setLayout(new BorderLayout());<br /> 				p7.setLayout(new FlowLayout());<br /> //add components to panels<br /> 				p7.add(textPrompt);<br /> 				p7.add(inputText);<br /> //add panels to our primary borderlayout<br /> 				add(p7, BorderLayout.NORTH);<br /> // add JTabbedPane to container<br /> 				getContentPane().add( tab );<br /> 				setSize( 400, 250 );<br /> 				setVisible( true );<br /> 				JButton button7 = new JButton("Enter");<br /> 				p7.add(button7);<br /> 				tab.addTab ("Customer Comments?",null,p7,"Customer Comments?");<br /> 				button7.addActionListener(this);<br /> 				}<br />  <br /> 			new ActionListener(){<br /> 				public void actionPerformed(ActionEvent e) {<br /> e.getActionCommand();<br /> 					int Comments=Integer.parseInt(inputText.getText()) ;<br />  <br /> 					if (e.getActionCommand().equals("Enter")) {<br /> 						JOptionPane.showMessageDialog(null, "Customer's comment:"+Comments,"", JOptionPane.INFORMATION_MESSAGE);<br /> 					}<br /> 				}<br />  <br /> 			};<br /> 		}<br /> 	}<br /> @Override<br /> 	public void actionPerformed(ActionEvent e) {<br /> 	}<br />  <br /> 	public static void main( String args[] )<br /> 	{<br /> 		FinalProject demo = new FinalProject();<br /> 		demo.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );<br /> 	};<br /> }]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/2928/4259.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/2928/4259.page</link>
				<pubDate><![CDATA[Tue, 13 Dec 2011 14:40:24]]> GMT</pubDate>
				<author><![CDATA[ buadler]]></author>
			</item>
			<item>
				<title>program doesn't return the value even though i already put a return statement</title>
				<description><![CDATA[ This is a random number game generator program. <br /> It consists of a player and game class.<br /> <br /> Player Class:<br /> <br /> import java.util.*;<br /> <br /> <br /> public class Player {<br /> static int g;<br /> public static int makeGuess()<br /> {<br /> 	Scanner check=new Scanner (System.in);<br /> 	System.out.println ("Take a guess.");<br /> 	g=check.nextInt();<br />    return g;<br /> 	<br /> 	<br /> }<br /> }<br /> <br /> <br /> Game Class:<br /> <br /> <br /> import java.util.*;<br /> public class Game{<br /> 	private static int secretNumber;<br /> 	private boolean won;<br /> 	int guess;<br /> 	int i=0;<br /> 	public Game()<br /> 	{<br /> 		secretNumber=0;<br /> 		won=false;<br /> 	}<br /> 	public void pickNumber()<br /> 	{<br /> 		Random rand=new Random();<br /> 		secretNumber=rand.nextInt(100)+1;<br /> 	}<br /> 	public void playGame()<br /> 	{<br /> 		while (i&lt;10&&won==false)<br /> 		{<br /> 			guess=Player.makeGuess();<br /> 			checkGuess(guess);<br /> 			i++;<br /> 		}<br /> 	}<br /> 	public void checkGuess(int g)<br /> 	{<br /> 		if (g&lt;secretNumber) <br /> 		{<br /> 			System.out.println ("Your guess is too low.");<br /> 			won=false;<br /> 		}<br /> 		else if(g==secretNumber) <br /> 		{	<br /> 			System.out.println ("You won.");<br /> 			won=true;<br /> 		}<br /> 		else <br /> 		{<br /> 			System.out.println("Your guess is too high.");<br /> 			won=false;<br /> 		}<br /> 	}<br /> 	public void printResults()<br /> 	{<br /> 		if (won==true) System.out.println ("WON, the secret number is "+secretNumber);<br /> 		else  System.out.println ("Lost,the correct number was "+secretNumber);<br /> 	}<br /> }<br /> <br /> 	<br /> GameTesting Driver Class:<br /> <br /> public class GameTest<br /> {<br /> 	public static void main(String[] args)<br /> 	{<br /> 		Game game1=new Game();<br /> 		game1.pickNumber();<br /> 		game1.playGame();<br /> 		game1.printResults();<br /> 	}<br /> }<br /> <br /> <br /> The return g in the Player class doesn't work. It doesn't return the int value g like it supposed to. :shock: <br /> 	<br /> 	<br /> 	<br /> <br /> &gt;]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/2926/4257.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/2926/4257.page</link>
				<pubDate><![CDATA[Fri, 2 Dec 2011 15:32:53]]> GMT</pubDate>
				<author><![CDATA[ caoyuxi]]></author>
			</item>
			<item>
				<title>!</title>
				<description><![CDATA[ I have to write a small program in which I create a method entitles "MyMin". I must import a scanner, request the user to input 3 numbers, then I must create the method, call it, and use it to output the minimum of the three numbers with an "if else" statement. I have code but it is in shambles and Im going nuts. Its not for a grade, but when I can't get something in class it drives me nuts. help!]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/2925/4254.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/2925/4254.page</link>
				<pubDate><![CDATA[Thu, 1 Dec 2011 16:51:53]]> GMT</pubDate>
				<author><![CDATA[ jaykhjr]]></author>
			</item>
			<item>
				<title>help to newbie!!! can't get it to work</title>
				<description><![CDATA[ hi all,<br /> can any one tell me what's wrong?<br /> i'm triyng to get next date from object that I created and still getting the same date<br /> <br /> [code]<br /> public Date nextDay()<br />    { int newDay=this.day, newMonth=this.month, newYear=this.year;<br />         if ((this.month == 1) || (this.month == 3) || (this.month == 5) || (this.month == 7) || (this.month == 8) || (this.month == 10)){<br />            if (this.day &lt; 31)<br />            newDay = +this.day;<br />            if (this.day == 31)<br />            newDay = 01;<br />            newMonth = +this.month;<br />         }<br />         if ((this.month == 4) || (this.month == 6) || (this.month == 9) || (this.month == 11)){<br />           if (this.day &lt; 30)<br />           newDay = +this.day;<br />           if (this.day == 30)<br />           newDay = 01;<br />           newMonth = +this.month;<br />         }<br />         if (this.month == 2){<br />           if (this.day &lt; 28)<br />            newDay = +this.day;<br />           if (this.day == 28)<br />            newDay = 01;<br />            newMonth = +this.month;<br />           if (((this.year%4 == 0) && (this.year%100!=0) || (this.year%400==0)) && (this.day==28))<br />           newDay = +this.day;<br />         }<br />         if (this.month == 12){<br />            if (this.day &lt; 31)<br />            newDay = +this.day;<br />            if (this.day == 31)<br />            newYear = +this.year;<br />            newMonth = 01;<br />            newDay = 01;<br />         }   <br />      return new Date(newDay, newMonth, newYear);<br />     }<br /> [/code]]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/2924/4252.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/2924/4252.page</link>
				<pubDate><![CDATA[Mon, 28 Nov 2011 13:34:21]]> GMT</pubDate>
				<author><![CDATA[ ribhoo]]></author>
			</item>
			<item>
				<title>Iteration using Newton Raphson's method</title>
				<description><![CDATA[ This is the assignment &gt;&gt;----http://www.cs.fiu.edu/~smithjo/assignments_2xxx/assign2xxx5_a.docx <br /> <br /> <br /> ***************** <br /> <br /> Here is my code <br /> <br /> I tried to put some kind of equation but it loops infinitely... <br /> <br /> <br /> <br /> public class TestNewton <br /> { <br /> <br /> private static double x = 5; <br /> private static int n = 3; <br /> <br /> public static void main(String[] arg) <br /> { <br /> <br /> <br /> <br /> <br /> System.out.println("Number Number Radical"); <br /> System.out.println("--------------------------"); <br /> <br /> while (x != 0 && x * (n + 1) - x * n &gt;= 0.005) <br /> { <br /> double number; //Loop control variable <br /> double d = (x * x * x) - (11 * (x * x)) - ((6 * x) + 5); <br /> double d2 = d *5; <br /> <br /> for (number = 1; number &lt;= 10; number++) <br /> { <br /> System.out.println(number + "\t\t" + d2); <br /> <br /> <br /> <br /> //x^3 - 11*x^2 - 6*x + 5 <br /> } <br /> <br /> <br /> } <br /> <br /> <br /> <br /> } <br /> } <br /> <br /> Help please. It's due sunday, at least a pointer. a hint...anything &gt;.&lt; <br /> ]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/2917/4244.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/2917/4244.page</link>
				<pubDate><![CDATA[Fri, 25 Nov 2011 22:43:31]]> GMT</pubDate>
				<author><![CDATA[ CodeTheRode]]></author>
			</item>
			<item>
				<title>&quot;GOTO&quot; Line</title>
				<description><![CDATA[ Hi,<br /> <br /> I know how to do loops such as for, do/while and while, if, if else, else if, etc.<br /> <br /> I'm looking for a "loop" that will return to a specific block of code or start at a specific line. This is an example of what it should do:<br /> <br /> [code]<br /> char start = ' ';<br /> String code = " ";<br /> <br /> System.out.println("Game: Guess the Number")<br /> System.out.println("Enter S to start, C to enter cheat code")<br /> <br /> <br /> if (start = c)<br /> {<br />      enter cheat code, then start game<br /> }<br /> <br /> else if (start = s)<br /> {<br />      start game normally<br /> }<br /> [/code]<br /> <br /> Below is what I'm doing now:<br /> <br /> <br /> [code]<br /> char start = ' ';<br /> String code = " ";<br /> <br /> System.out.println("Game: Guess the Number")<br /> System.out.println("Enter S to start, C to enter cheat code")<br /> <br /> <br /> if (start = 'c')<br /> {<br />      code = console.next();<br />      start = 's';<br /> }<br /> <br /> else if (start = 's')<br /> {<br />      //start game normally<br /> }<br /> [/code]<br /> <br /> Thanks if you can help, please tell me if you don't understand what I'm saying so I can rephrase it :)<br /> *ALSO this is NOT a school project, so go ahead if you need to show me something I haven't learned yet :p (I'm way further ahead then my class anyway)]]></description>
				<guid isPermaLink="true">http://forums.hotjoe.com/posts/preList/2910/4228.page</guid>
				<link>http://forums.hotjoe.com/posts/preList/2910/4228.page</link>
				<pubDate><![CDATA[Thu, 17 Nov 2011 14:05:14]]> GMT</pubDate>
				<author><![CDATA[ chowbaaron]]></author>
			</item>
	</channel>
</rss>
