32,199 Topics

Member Avatar for
Member Avatar for TechnoArt

Can somebody provide me the solution's for below 3 question: 1) Construct a program that is capable of printing the multiplication table for two variables. For example if the user enters x as 5, and y as 6, the multiplication table that will be printed out is as follows: 1*6=6 …

Member Avatar for masijade
0
162
Member Avatar for m_sam6

how to implement a java class making dynamic queries in java that access mySql tables query,insert & delete taking changing conditions & parameters every time like : SELECT field_names FROM tablename WHERE condition every time it takes different field_names , tablename and conditions

Member Avatar for sillyboy
0
47
Member Avatar for charlie81

I am getting an error saying NumberOperations can't be instantiated. Here is the code. [CODE][LIST=1] [*]public static void main(String[] args) { [*] // TODO Auto-generated method stub [*] // declare variables [*] int num1, num2, sum, diff, product, average, absolute, max, min, adjusted1, adjusted2, adjustedSum; [*] // Display Program Title …

Member Avatar for knowledgelover
0
167
Member Avatar for k2k

I fixed the StackOverFlowError problem from my last thread.. however, my ActionListener is still not working. if any GUI guru here may point out the issue, it would be great. i think this is something very simple and i miss it. [code] //my ActionListener class import java.sql.*; import javax.swing.*; import …

Member Avatar for k2k
0
111
Member Avatar for neutralfox

Hello everyone, I am currently developing a chat application and I want to encrypt all send messages. I am using the example below: [code] import javax.crypto.Cipher; import javax.crypto.KeyGenerator; import javax.crypto.NoSuchPaddingException; import javax.crypto.IllegalBlockSizeException; import javax.crypto.BadPaddingException; import java.security.Key; import java.security.Security; import java.security.NoSuchAlgorithmException; import java.security.InvalidKeyException; public class DESCryptoTest { public static void main(String[] …

Member Avatar for neilcoffey
0
641
Member Avatar for redmaverick

[CODE] import java.util.Scanner; public class testcircle { public static void main(String[] args) { System.out.println("welcome"); double i; Scanner sc = new Scanner(System.in); Scanner scan = new Scanner(System.in); String choice = y; while (i<=10) { while (choice.equalsIgnoreCase("y")); { System.out.println("Enter the Radius"); String radius=sc.next(); System.out.println("Enter the Object name"); String Object = scan.next(); if(Object.equalsIgnoreCase("circle")) …

Member Avatar for BestJewSinceJC
0
448
Member Avatar for cherryduck

Hi everyone, I'm trying to create a simple Java game, The Last Space Invader, where you control the last space invader and the tank automatically tracks and shoots at you. The code for my invader is as follows: [CODE]import javax.swing.*; import java.awt.*; import java.io.*; import javax.imageio.*; import java.awt.event.*; public class …

Member Avatar for cherryduck
0
490
Member Avatar for k2k

hi, would someone please point out what is wrong with my ActionListener setup? [code] // in my menu class, parse JScrollPane and JTable to the showTable constructor in the ShowTable Class showTableMItem.addActionListener(new ShowTable(scrollPane, table)); [/code] [code] /* * set local JScrollerPane and JTable to be the JScrollPane and JTable from …

0
76
Member Avatar for neutralfox

Hello guys, I want to know if its possible to use the same socket to transfer two things at the same time. [code] // set up input stream for objects input = new BufferedReader(new InputStreamReader(clientsoc.getInputStream())); // set up output stream for objects output = new PrintWriter(new OutputStreamWriter(clientsoc.getOutputStream())); output.println(nickName + " …

Member Avatar for neutralfox
0
171
Member Avatar for abhi_elementx

hi. I get a NillpointerException. Here's my code: [CODE] private void Login_ButtonMouseClicked(java.awt.event.MouseEvent evt) { String usrname = uname_TextField.getText(); String pass = passwd_PasswordField.getText(); String pwrd = pass.toString(); String args[] = null; boolean auth_flag = false; try{ R = S.executeQuery("select uname, passwrd from Employee_Master;"); while(R.next()){ if(usrname.equals(R.getString("uname"))){ if(pwrd.equals(R.getString("passwrd"))){ this.dispose(); [B]args[0] = R.getString("uname")[/B]//causing nullpointerexception …

Member Avatar for BestJewSinceJC
0
114
Member Avatar for Prateek Parmar

hii i am new learner of java.. I just want to know that it is necessary to declare a default constructor if we are declaring parameterised constructor..

Member Avatar for verruckt24
0
90
Member Avatar for neutralfox

Hello friends, Got a new question, can someone explain to me how to put an HTML link in my Java program. Example ... "Click here to visit the developer website". So when someone will click on the link, the web page should automatically open in the browser. I searched on …

Member Avatar for neutralfox
0
100
Member Avatar for geek-girl

Hi, I'm pretty new to java and I'm not asking for anyone to do any coding for me. I just need pointing in the right direction. How do I go about printing out the objects of an array sorted alphabetically by name without altering the original array. I know I …

Member Avatar for BestJewSinceJC
0
163
Member Avatar for smsamrc

i have to do a java program to perform polynomial operations. i can manage those operations part. but i have a problem when storing the terms of the polynomial in to a linked list. for example when it is given polynomial("4 2 5 3 6 0"); // 4x^2+5x^3+6 may be …

Member Avatar for smsamrc
0
2K
Member Avatar for custurd12

my program won't even run so i must have missed something drastically but i don't see it.... anyway, Create a class called Factor that has a public method called calculateFactor. The method has two two arguments of type integer and checks whether the smaller of the two integers is a …

Member Avatar for stephen84s
0
144
Member Avatar for redmaverick

[CODE]public abstract class CircleShape { public double radius; public CircleShape(){} public CircleShape(double radius) { this.radius=radius; } public void setradius(double radius){ this.radius=radius; } public String toString() { return "radius"+ radius; } abstract String getDisplayText(); } [/CODE] [CODE]public class circle extends CircleShape{ private double area; public double area() { return radius*radius*3.14; } …

Member Avatar for BestJewSinceJC
0
2K
Member Avatar for osjak

Hi All, I am just learning Java and there is a concept that I cannot grasp. I am writing a simple exercise program that works with stacks. I have a sum method for two different types - Integer and Double. They both have the same logic, so it seems redundant …

Member Avatar for BestJewSinceJC
0
708
Member Avatar for ViLeNT

Hello, I am attempting to create a program that accomplishes the following: *I am to develop a heap, that is tree-based(not array) *The heap should be ascending *Include the method toss() -This method will randomly toss a node into the heap and will not maintain the proper heap conditions *Include …

Member Avatar for BestJewSinceJC
0
114
Member Avatar for abhi_elementx

hi. I have a jlist on a frame. I want to add items dynamically in the list. So, I am using DefaultListModel..Here's my code: [CODE]public class AdminFrame extends javax.swing.JFrame { private Statement S; private ResultSet R; DefaultListModel model = new DefaultListModel(); JList Employee_list = new JList(model); /** Creates new form …

Member Avatar for JamesCherrill
0
74
Member Avatar for llemes4011

I don't know where this question came from, but... Is there a way to start at one directory, say... C:\ . and I wanted to go into that folder, and printout a list of the folders/files in that directory, and then do the same for the rest of the folders …

Member Avatar for llemes4011
0
96
Member Avatar for ClimaxBeetle

Hello, this is my first time in participating in this forum and also this is the first time that I've used Java for my entire life. The objective behind my problem was: "Create an Animal Interface that has two methods: eat and move. All these methods do not have any …

Member Avatar for BestJewSinceJC
1
133
Member Avatar for abhi_elementx

Hi. I have two tables in mysql - [B]customer_master[/B] and [B]contact_master[/B]. customer_master has a primary key - "cust_id" ,which is a foreign key in contact_master and "cust_name" which is also a foreign key in contact_master. I have a [B]frame[/B] which will do [B]CRUD operations for contact_master[/B]. The frame has two …

Member Avatar for BestJewSinceJC
0
825
Member Avatar for jam7cacci

I'm trying to compare two variables that is being inputed by the user but then it wont function [code] if (txt_pay.getItem() < txt_amount.getItem()) { jOptionPane1.showMessageDialog(this, "please enter the right amount"); } [/code] what could be wrong? the error says [quote] operator < cannot be applied to java.lang.string [/quote] another one …

Member Avatar for jam7cacci
0
109
Member Avatar for manfosys

Hi to all, I wrote the java pgm for download the webpage content(html+images) and write on local host.Its wrks fine .But some time it stop while downloading .ie it download only some pages and images.I wrote pgm within try &catch.It doesnt throw any exception like connection time out,connection reset; iam …

Member Avatar for peter_budo
0
95
Member Avatar for k2k

hi, i have just written a simple hello world java program in my linux server, installed jdk ... and tried to compile and run it and it gave me some errors. please details below: [root@localhost javaFiles]# cat HelloWorld.java [code] import java.util.*; import java.io.*; public class HelloWorld { public static void …

Member Avatar for k2k
0
130
Member Avatar for hollywoood69

Here is my assignment: Write a class named 'Video' that has two attributes, a title (type String) and rating (type int). Then write an application class named 'VideoStore' that first creates an array consisting of 5 video objects, then display the list three times; first unsorted, then sorted by title …

Member Avatar for javaAddict
0
381
Member Avatar for rayda

hi there! I have a file.txt looks like this: [QUOTE]Michael 001 Yeeka 002 Sam 003 Tom 004[/QUOTE] Michael is the member name, while 001 is the ID number. How can I write a coding to validate that whether user has type in the correct name and ID that is inside …

Member Avatar for verruckt24
0
82
Member Avatar for bobrien314

I am trying to implement a breadth first search tree. I need to be able to go up and down the tree, and on each layer there can be varying amounts of nodes on each one. My problem is I've never made a tree before, and i don't know how …

Member Avatar for BestJewSinceJC
0
258
Member Avatar for lelandstrott

Hello everyone I was failing, how to write an Access Database using Java J2SE 5 edition ? Could you guys help me out? Any help would be appreciated. Thanks

Member Avatar for Ezzaral
0
33
Member Avatar for chibex

Hi guys, Am faced with a challenge in the office to develop a software that can take a smaller mpeg4 frames and search for the occurrances of the frames within a larger mpeg4 file. For example a television station pragrammes are recorded for 24 hours and a company that placed …

0
77

The End.