32,204 Topics
| |
Good day to every one. First here is my code so far import java.io.*; public class Program2 { public static void main (String[]args) throws IOException{ BufferedReader bv = new BufferedReader (new InputStreamReader(System.in)); String a, b, c, x; Float d, e, f, g, h, i, j, k, l, m, ave; System.out.println("ENTER … | |
i am doing a group project concerning graph my part is finding the minimal cost the teacher tried to help us out with the group work by putting up code for the parts for use to follow. i have errors when i compiled the code that the teacher give. the … | |
hey guys, i was looking into rewriting the php custom framework at work into java. i was going to download the J2EE but there is 2 versions. J2EE SDK (regular) and J2EE Web Profile SDK http://www.oracle.com/technetwork/java/javaee/downloads/index.html i've look at the descriptions and the includes and it look the same. whats … | |
Hi, I'm currently creating a pool game which is nearly complete but I want to have it as a 2 player (human vs human) game. All that I want the program to perform is that when the game begins then the two players are asked to enter their names (I … | |
i want to create a program that would translate number to words from 1-1 billion this is how i started: package app.runner; import javax.swing.*; public class EnglishNumberToWords{ public static void main(String args[]){ int inputNumber=0; String oness[]={"one","two","three","four","five","six","seven","eight","nine","ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"}; String tens[]={"ten","twenty","thirty","fourty","fifty","sixty","seventy","eighty","ninety"}; String answer=""; String calculate=""; inputNumber=Integer.parseInt(JOptionPane.showInputDialog(null,"PLease Enter a Number: ")); int billion=inputNumber/1000000; int … | |
public int insert(Order order) throws SQLException { PreparedStatement insert = null; int orderKey = -1; try { String method = new String("DBInterface.insert( Order )"); FileLogger.log(FileLogger.HIGH, method + " - Entering..."); int col = 0; int actionCode = getCodeKey("ORDER_ACTION", order._action); int statusCode = getCodeKey("PCO_AUTO_STATUS", order._status); int falloutTypeCode = getCodeKey("FALLOUT_TYPE", order._falloutType); orderKey … | |
How can I print a BufferedImage? I mean how can I send a BufferedImage to the printer? I heard something like printJob but I don't get it. Please help me about this. Thanks in advance. | |
String q = new String(“Cat”); String r = q; String s = new String(r); I understand that the first line would equate to `String q = "Cat";` and the second would be `String r = q;`, but what would the last one equate to without using new? I originally thought … | |
Hey guys. Im in my first week of class for Java OOP. This is what my first assignment looks like **1. Ask from the user: how many students take CompSci in summer, and store that number in a variable.** **2. Ask the user to input the name and mark of … | |
What is the simplest algorithm to write in pseudocode to cipher the letters of the alphabet with different letters in the alphabet? | |
Can anybody help me out, show me where to look or a keyword or something? I'm trying to figure out how to write simple programs that can manipulate other programs. To keep it simple, and as a start, I'd like to be able to run the program to insert a … | |
So I'm working on a checkers like game that involved moving two different types of pieces around the board to try and capture the opponents pieces. One of these pieces is a ball, and it's movement rules are that it can move up and down only one space per turn, … | |
I have made a simple web browswer in java. The problem is it's to simple. How would I add things like HTML5 support in my web browser? | |
Hi all, I have an input text file with content bellow : ------------------------ ABC = Any Body Cus JS = Java Script Ser = Serverlet Ars = Arsenal Any Body Cus = Any Body Cus Java Script = Java Script Serverlet = Serverlet Arsenal = Arsenal ------------------------ so i want … | |
import java.util.*; import java.net.*; import java.awt.*; import javax.swing.*; import javax.swing.border.*; import javax.swing.plaf.*; import java.awt.event.*; import java.io.*; import snmp.*; public class SNMPInquisitor extends JFrame implements ActionListener, Runnable { JButton getDataButton, getTreewalkDataButton, getTableButton, getNextButton, setValueButton; JButton clearButton; JTextArea messagesArea; JScrollPane messagesScroll; JTextField hostIDField, communityField, OIDField, valueField; JLabel authorLabel, hostIDLabel, communityLabel, OIDLabel, valueLabel; … | |
I installed Apache Tomcat 7.0.28 in my JBuilder6. I use JDK 1.6.0_32 (jre6). I can get http://localhost:8080/ page. However, when I tried to run my JSP file, I encountered following error: FileUpload.jsp: java.lang.NoClassDefFoundError: org/apache/tools/ant/Task FileUpload.jsp: Caused by java.lang.NoClassDefFoundError: org.apache.tools.ant.Task ...12 more Could not find the main class: org.apache.jasper.jspC. Program will … | |
Hey guys, I am creating a simple java swing app that would allow me to monitor the activity on my sites. I am using google analytics api to do most of the monitoring(breif descritpion can be found here : https://developers.google.com/analytics/devguides/reporting/core/v2/gdataJava) however this does not show how to incorporate the new … | |
I apolagize if this question has been asked before, but I was looking to see how I would go about writing an editor that saves the file on a server instead of on the harddrive. I would appreciate any and all help. | |
Hello Guys, I am writing an elevator problem and am stuck at the movement of the elevator and also stopping the elevator. The elevator is suppose to state the current floor is starting and the number of passengers that are in the elevator. I am able to let it go … | |
[CODE]I'm currently redesigning my website in Dreamweaver CS5. My site was previously made in iWeb, which centered the page automatically in any browser at any resolution. When I preview my site in Safari using Dreamweaver, the whole page seems aligned left. Another issue (which I should probably also post in … | |
public class Stack extends LinkList{ public Stack(){ public void push (Object element) { insertAtFront (element); } public Object pop(){ return removeFromFront(); } public Object peek(){ return getFirst(); } } Im trying to create a movieApp using pop push and peek method(Stack). But once the class got compiled, it shows a … | |
CAN anyone help me in knowing the differences between J2EE, J2SE & J2ME... I am a newbie to Java. Please explain me in detail. Thankz in Advance !!! | |
hi guys, i really need help on this problem. i have a code, but i need to convert it to algorithm.but i dont know how since im still new in this programming matter. hope u guys can help me please.... thanks for advance. public static void calculateTotalTupples(int p, int s, … | |
Do you people think slick2d is the best framework ever? I have tried it and now I am really enjoy using it to develop my next game in java. | |
I'm trying to load a PNG file into a BufferedImage like so: BufferedImage image = ImageIO.read(new File("smile.png")); When I use this line of code alone, it produes the error: Unhandled Exception Type IOException... I can fix this by surrounding the statement with try/catch like so: BufferedImage image = null; try … | |
I've got this thing that has kept me puzzling for a few days now. I've created an array of 30 integers, randomly chosen. I would like to add the integers randomly to a two-dimensional array of 12 x 12 integers. The remaining elements in the two-dimensional array should keep their … | |
I am looking forward to develop game in java and might sell it as well so here is the question: Do we need to pay fee to Oracle if we sell our game on the market or host it on our own web site with advertisement on the game page? … | |
i have this code in main.jsp <html> <head> <link rel="stylesheet" href="/bipi/css/bp.css" type="text/css" media="screen"/> </head> <body> <div class="navigator"> <a id="currenttab" href="/WEB-INF/jsp/main.jsp">Add</a> <a href="/bipi/display.jsp">Delete</a> <a id="currenttab" href="/WEB-INF/jsp/main.jsp">Main</a> </div> <%--<% String fname = request.getParameter("f_name"); String fage = request.getParameter("f_age"); if (fname != null && fage != null ) { com.test.gerrard.Insert(fname, fage); } %>--%> <form … | |
hi my complier showing me that i am having 4 errors.In **t1.drawHexagon(int width)**; & **t1.drawPentagon( int width )**.Its says .class and ";" expected. Help. Thank you import java.util.*; import java.awt.*; public class Turtle extends SimpleTurtle { public Turtle (int x, int y, Picture picture) { super(x,y,picture); } public Turtle (int … | |
Hi, I am trying to make simple gui which switches jpanel inside jframe but my IDE says "Cannot make static reference to non static method setPage(int) from the type Main". Why is that? There is no static modifier on actionPerformed or at setPage or actually anywhere else than public static … |
The End.