32,199 Topics

Member Avatar for
Member Avatar for howemonster

So I am writing a program to read text from a file. Save from an array list to an array and then parse that array for ',' and use that to change words position in the 2d array i will write from the 1d array. So essentially String[]{"a,b,c","d,e,f"} ought to …

Member Avatar for howemonster
0
147
Member Avatar for MasterHacker110

I am trying to figure out where is Java and C# mostly used? I read that enterprises favors Java and JEE, but they don't say anything about JSE. I also read that C# is being used a lot, especially on Windows platforms. But the question remains, what do enterprises use …

0
98
Member Avatar for Doogledude123

I'm trying to make this as easy as possible but I'm stuck. Inside the for loop, if the input entered was not a number or wasn't valid, it moves on, but I don't want it to. I want it to repeat that interation. Is there a possible way to do …

Member Avatar for JamesCherrill
0
396
Member Avatar for LVZombie

I am now on part 3 of a payroll program for my Java class but I did not add the while loop in last week so I need to figureout what I did wrong so I can do part 3. The program should loop until the user enters "stop" It …

Member Avatar for jwenting
0
255
Member Avatar for anand11mc04

sir , I have need to start a thread on click of submit button on my jsp page. I am using Java Bean for Codeing. please write small program to start thread on button click of jsp page. Thank you.......

Member Avatar for stultuske
0
85
Member Avatar for nickkipr

package dmaze2; import java.awt.Dimension; import javax.swing.ImageIcon; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class Dmaze2 extends JPanel { JTable jt; ImageIcon Icon = new ImageIcon("x.png"); JTable imagelabel = new JTable(Icon); public Dmaze2() { Object[] columns = {"1","2","3","4","5","6","7","8"}; Object[][] table={{"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","o","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}, {"f","f","f","f","f","f","f","f"}}; …

Member Avatar for mKorbel
0
235
Member Avatar for Vlad_2

// Convert Celsius to Fahrenheit and vice versa. import java.awt.BorderLayout; import java.awt.FlowLayout; import java.awt.GridLayout; import javax.swing.JTextField; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; public class ConvertTemp extends JFrame { // instance variables JLabel labelFahr; JLabel labelCels; JTextField textFahr; JTextField textCels; JButton conFahToCel; JButton conCelToFah; public ConvertTemp () { super …

Member Avatar for Vlad_2
0
8K
Member Avatar for Builder_1
Member Avatar for Hiroshe
0
135
Member Avatar for SpottyBlue

I was doing my 2nd assignment to create a bank program using Java. I got a problem when I run a few times. For example, I entered the starting amount as $50000. Then, I choose withdraw. I tried to enter withdrawal amount as $5000. Then, I choose to check balance, …

Member Avatar for howemonster
0
415
Member Avatar for abra_ka_dabra

Is there ay inbuilt method to convert 2D array into CSV file? e.g. Can anyone give me a hint to convert [1,2;3,4] into a file output.csv?

Member Avatar for howemonster
0
416
Member Avatar for sheelap

some people says that java is not purly oops language like C++.pls suggest me if it is true then why iot is so?

Member Avatar for mike_2000_17
0
203
Member Avatar for MasterHacker110

I am writing a program that will open another form, the user will continue doing stuff on the new form and would then close the form. When and only when this new form closes, the main form should continue with its work and re-enable some components. Here is the code: …

Member Avatar for mKorbel
0
208
Member Avatar for MasterHacker110

I am trying to read a some data that is stored in an xml file and then print it to the screen for the user. But my program isn't working correctly. Here is my XML document: <UserAccounts> <Account AccountNumber="1234567890"> <Password>12345</Password> <Balance>1024.64</Balance> </Account> </UserAccounts> And here is my code: File fXmlFile …

Member Avatar for MasterHacker110
0
301
Member Avatar for Vegito1991

I have been struggled to solve this problem for few days, i was working on multichat application where in this class i want to send the text to the server and and response in the client side, if anyone can help me i really appreciate from what i known the …

Member Avatar for JamesCherrill
0
377
Member Avatar for moaz.amin.37

hi: we use system("cls") function in c++ i need a function or a class or any command that i give it in my code that clear my screen plz help me

Member Avatar for JamesCherrill
0
335
Member Avatar for CervantesLost

Hi, I picked up this code on daniweb and am trying to get it further. Here's the class import java.util.*; import javax.swing.*; public class LibraryBook { private String title; private String author; private int pageCount; //contructor for books title, author, page public LibraryBook(String bookTitle, String bookAuthor, int bookpageCount) { title …

Member Avatar for JamesCherrill
0
187
Member Avatar for masonketcham

This is the last part to my assignment and when I go to compile the last part I come up with 7 errors unsure what it is that it wants me to do. The errors are: C:\Users\Owner\Desktop\week9 part6\Inventory6.java:212: error: illegal escape character strPrice = strPrice.replaceAll("\$", ""); ^ C:\Users\Owner\Desktop\week9 part6\Inventory6.java:270: error: …

Member Avatar for masonketcham
0
183
Member Avatar for Doogledude123

I am trying to create a File Searching Utility that finds all Files with a given Name which searches all Folders (Sub Directories, and Sub Directories of Sub Directories) in a given Directory. I was thinking of a way to use For Loops, or For Each, but that would mean …

Member Avatar for JamesCherrill
0
259
Member Avatar for sana.f.qureshi_1

Hey there good people. well i have implemented the whole code of compiler phase 1. Have implemented al the DFAs and most are working fine. But this comments DFA is giving me grief. What it should do is, it should ignore anything written between { } . but it's not …

Member Avatar for sana.f.qureshi_1
0
175
Member Avatar for valmiki007

How to create a method that takes input string and returns the most frequently occurring letter(s) in string? **Prototype of the function:** public String Duplicate(String str) **Constraints:** 1. If there are two or more letters which are most frequently occuring, then return all possibilities in the output. 2. The input …

Member Avatar for JamesCherrill
0
173
Member Avatar for NyQii

i have to find a round trip for an Edinburgh bike club (data below) using two approaches: a) a conventional search algorithm; b) a genetic algorithm What i must do : 1. Produce a program using a search algorithm of your choice that will find a ‘good’ circuit from Edinburgh …

Member Avatar for jwenting
0
263
Member Avatar for new_2_java

Hi all, I have a multi-threaded program. This program, lets say spawns 10 threads. I would like to update a variable when each thread finishes its job. The reason why I am asking this, is because I would like to show something like progress bar (not really a progress bar, …

Member Avatar for JamesCherrill
0
6K
Member Avatar for riffat.jaffery.3
Member Avatar for stultuske
-2
108
Member Avatar for ali11

i just learn about single linkedlist and i am trying to create a program. public class linklis { public static void main(String[] args) { LinkedList ab= new LinkedList(); ab.add("1"); ab.add("2"); ab.add("4"); ab.add("7"); System.out.println("the list" + ab); System.out.println("remove 2nd element: " + ab.Delete(2)); System.out.println(" - print linkedlist size: " + ab.size()); …

Member Avatar for stultuske
0
277
Member Avatar for neutralfox

Hello everyone, I got a small question on encryption, actually I am trying to learn the various techniques to encrypt a message. Now I am trying AES, using the built in security package in Java. The problem is that I am having a problem with this encryption algorithm. Actually I've …

Member Avatar for JamesCherrill
0
988
Member Avatar for shelton22

Can any one convert this Java code to c++? import java.util.*; import java.io.*; public class Test { private static HashMap<String, List<String>> left_map_rights; public static void main(String args[]) throws Exception { left_map_rights = new HashMap<>(); BufferedReader r = new BufferedReader(new FileReader("routes.text")); String line; HashMap<String, Void> lines = new HashMap<>(); while ((line …

Member Avatar for Hiroshe
0
384
Member Avatar for Doogledude123

I'm trying to create a set of selectable labels, New Game, Load Game, Options, and Exit. I created a MenuItem class which extends Label, and set up the constructor to use the standard stuff expected from a Label. Here is the class. package com.irridium.echo.menu; import com.badlogic.gdx.graphics.Color; import com.badlogic.gdx.scenes.scene2d.ui.Label; /** * …

Member Avatar for Galbatorix
0
671
Member Avatar for moaz.amin.37

there is my question that normally in java we create object with new operator but when we want to use String and String is also a class then we declare object without new operator why plz answer my question

Member Avatar for 203428
0
227
Member Avatar for Khan_1

import javax.swing.*; public class BankAccount { //======== fields (attributes, members)====== private String name; private String acctNo; private double balance; private final double MIN_BALANCE = 50; /** initialize all fields as default values */ public BankAccount() { name="N/A"; acctNo="00000"; balance=0; } /** initialize the fields @param n initializes name @param aNo …

Member Avatar for jwenting
0
455
Member Avatar for sasikrishnasamy

Hi to all, It’s one of the question in test, I am confused please someone help. MainClass{ Public static void main(String [] a){ Employee e=new Employee(); for(int i:e){ // Something } Now If I compile this code I will get an error. But without changing for each condition I want …

Member Avatar for jwenting
0
118

The End.