32,204 Topics

Member Avatar for
Member Avatar for skyyadav

I have written this code to find the cycle in graph public boolean hasCycle(int i, int[][] mat) { visited[i] = 1; // for( int i = 0; i < numNodes; i++ ) for (int j = 1; j < mat.length; j++) { if (mat[i][j] == 1 && i != j) …

Member Avatar for noorullah06
0
214
Member Avatar for Dio1080

Ok, I need help on a for loop nested program using for loops, I'm trying to use a patten that goes like this: 123456 12345 1234 123 12 1 but when I try it, it goes like this: 654321 65432 6543 654 65 6 This is my program: public class …

Member Avatar for JamesCherrill
0
536
Member Avatar for seanynguyen

Hey guy, I am developing an enterprise application using JavaEE7 EJB 3.1 that is "Fast food restaurant management". Now I am writting a framework for user to create many types of event they wish. Let's say, like KFC or McDonalt, they usually apply many event to discount their products, or …

Member Avatar for seanynguyen
0
82
Member Avatar for JBProgrammer

I am having trouble getting the health deductions from the TaxablePay method to the getNetPay method. I have tried everything I can think of including using a taxablePay class. I am running out of ideas. I have below... 1.The program description(what i want the program to do). 2.The expected output …

Member Avatar for JamesCherrill
0
1K
Member Avatar for smdjilani

hai I have Sunjava 7 installed in my pc, but when i run my java programs in my linux it won't works it's again saying to install java what should i do

Member Avatar for jalpesh_007
0
94
Member Avatar for sarah49

Hi, I'm trying to extract the contents of a web page using htmlunit 2.9 I sent the home page URL through Webclient and got the login page from the application.I submitted the form by filling the user ID and password fields. The HTMLpage data that I received from the application …

Member Avatar for cool_zephyr
0
122
Member Avatar for gasim774

i need help with this: Write a Java program that allows the teacher to calculate the grade for a student. Specification: 1.prompt the user to enter the Student ID number, first name, last name, and the average score for each of the following categories. o Assignments (worth 50%) o Quizzes …

Member Avatar for rishif2
0
93
Member Avatar for douglas.shrader.1

I can't seem to center align my background image. I am new to php, css, and java coding but finding it necessary in this day and age. Here is the code. I hope this will help. <style> body{ background: url(http://dsninformation.com/images/magic.jpg); background-repeat: no-repeat } .button { display : inline-block; cursor : …

Member Avatar for douglas.shrader.1
0
327
Member Avatar for ferizhandi

I am writing a application.and i need to draw line in jpanel.but it is crash when jpanel add to jframe.this is my code: public class Simplification extends JFrame { JPanel panel; public Simplification(List<List<Integer>> transmitionTable , List<List<Integer>> outTable) { this.setTitle("Simplification Result"); this.setSize(500, 300); this.setLocation(50, 50); this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); this.setVisible(true); // do other jobs …

Member Avatar for JamesCherrill
0
218
Member Avatar for kafi_1

I need help with this: -write an application to perform simple arithmetic operations on integers. Specification 1.Name the .java file SimpleMath 2.The program should do the following: ◦Prompt the user to enter five integer values from the keyboard. ◦Display the sum and average of the numbers. ◦Display the quotient of …

0
176
Member Avatar for Start4me

I'm trying to have the following output of the program: 01/01/2010 But when I run the program I get : 01/01/10 How would I format the date to be like I want? This is the code I have: import java.util.Calendar; import java.util.GregorianCalendar; public class HelloWorld{ public static void main(String []args){ …

Member Avatar for JamesCherrill
0
336
Member Avatar for anestistsoukalis

So this is what i dit. Declared three classes: Main Term Polynom So in Polynom i try to call a "plus" method: i tried this: public Polynom add(Polynom pol){ Polynom res = new Polynom("",0); Term tox = new Term(0,0); for(Term p : Polynom){ for(Term other : pol.Polynom ){ if(p.getDeg()==other.getDeg()){ tox.setCoef(p.getCoef()+ …

Member Avatar for JeffGrigg
0
252
Member Avatar for techxaidz

-=Car Parking Monitoring System=- Hi there folks, i need some idea regarding on the problems that the user might encounter during the transaction is on going. Like for example, the customer might change his mind on parking but he was already timed-in in the system. Thanks for the share guys, …

Member Avatar for JamesCherrill
0
184
Member Avatar for Gl753

Write a program to compute the computer programming grades of 8 IT students. Randomly create student numbers for each of the students and store each in an array. The program should take the input of (validate the input where appropriate): Names of Students and store them in an array. Addresses …

Member Avatar for JamesCherrill
0
225
Member Avatar for murali2489

Dear Team, I am writing a Swing application for my project which gets the user information and saves it in a database and then displays in a JTable. I thought like, instead of manually updating the data from our client website, why not read the data from the site and …

Member Avatar for murali2489
0
248
Member Avatar for vishalrajole

Error: Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at assignment.MainFrame.validateEmail(MainFrame.java:324) at assignment.MainFrame.btnRegisterActionPerformed(MainFrame.java:208) at assignment.MainFrame.access$000(MainFrame.java:19) at assignment.MainFrame$1.actionPerformed(MainFrame.java:80) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) at java.awt.Component.processMouseEvent(Component.java:6505) at javax.swing.JComponent.processMouseEvent(JComponent.java:3320) at java.awt.Component.processEvent(Component.java:6270) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4861) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4687) at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4832) at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4492) at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4422) at java.awt.Container.dispatchEventImpl(Container.java:2273) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4687) …

0
102
Member Avatar for ezra.kim.98

I need help with the following This is what I have so far, can someone just note down how they would go about writting the if statement Thanks. /**Returns the result of a card requesting to move through a door. * A move will be successful if: * the rating …

Member Avatar for deceptikon
0
118
Member Avatar for ObSys

Hey guys I recent wrote the deal or no deal game in Java for fun. It currently operates using a Command driven interface where users input numbers based on textual feedback. My aim is to develop this into a full GUI interface, however, I have not met GUI's yet in …

Member Avatar for JamesCherrill
0
459
Member Avatar for littledevils326

I am wanting to measure the performance of an algorithm which I've created, and for some reason the value decreases significantly as I run through my loop

Member Avatar for ObSys
0
241
Member Avatar for asif49

This is kind of what I'm trying to do. I'd like to do something, have a mini 1 second wait then do something else. The below example illustrates... private void someTypeOfMouseClicked(java.awt.event.MouseEvent evt) { handleMouseClick(j); } private void handleMouseClick(JLabel j) { j.setText("hi"); Thread.sleep(1000); j.setText("yo"); } What happens is that it takes …

Member Avatar for asif49
0
123
Member Avatar for santoshedunum
Member Avatar for JamesCherrill
0
102
Member Avatar for Student22

A NetflixFileReader class that handles reading the provided data file. For each line of the file, a new Media object (either Movie or Series) should be created and added to a list of Media objects. This class should include a method that returns the finished list.

Member Avatar for JamesCherrill
0
148
Member Avatar for KhubaibQaiser

I am making a programe based on socket programing in which client can download one of the listed books from server. I have come up with this code but the problems with it are: 1) It doesnt downloads pdf file greater than 1MB. 2) It allows client to download 1 …

Member Avatar for JamesCherrill
0
308
Member Avatar for lf95

Can someone help me write a program to compute the computer programming grades of 8 IT students. ● Randomly create student numbers for each of the students and store each in an array. The program should take the input of (validate the input where appropriate): ● Names of Students and …

Member Avatar for JamesCherrill
0
329
Member Avatar for Benjamin_4

double compute() { double monthly, acumulation; for(int y = 1; y<5; y++) { monthly = (Cost * numYears) / residual; acumulation = (monthly * y); return acumulation; } } this is function i wrote to compute monthyly depreiation and accumulation. but the error i get is missing return statemen and …

Member Avatar for JamesCherrill
0
131
Member Avatar for peter.son.10297

Hai everyone. I am new to this forum. Can anyone tell me the scope of jobs in java for the nest 10 years.

Member Avatar for JamesCherrill
0
166
Member Avatar for ZombieKnight93

I am completely lost right now. I don't get what the questions are trying to say and I want to know if someone can give me pseducode or just a small example on how to start them off because like I said I'm lost. I'm not trying to get answers …

Member Avatar for JamesCherrill
0
182
Member Avatar for lilazn

In my high school programming class we are learning Java. We have been assigned into groups of two and have freedom to choose any project. I was wondering if anyone could come up with some ideas(games) for beginners like us. We have worked a bit in Java, I would say …

Member Avatar for JamesCherrill
0
45
Member Avatar for johnmecanse34
Member Avatar for pkrdimos

Hello. I am looking into mining API Usage Patterns for a project I am trying to work on. I would like if possible to avoid going through the trouble of building the (whole) tool from scratch as it will take quite some time. What I would like to avoid if …

0
128

The End.