35,618 Topics

Member Avatar for
Member Avatar for drsnet41

I'm trying to pass a .txt file as a paramater into my java program. The line that reads in the file is: Scanner in = new Scanner(System.in); My program is titled SetTest and the file I'm trying to read is Ted.txt. If I go to a Windows 7 command prompt …

Member Avatar for sepp2k
0
12K
Member Avatar for sankubha

i have a java file to send mail and a jar file javax.mail.jar...... how to import jar file inside java file

Member Avatar for stultuske
0
67
Member Avatar for somjit{}

I think i have understood the basic locks , synchronized statements and methods etc etc . I would like to actually program something that used all this. Something that is prone to breaking if one is not careful , also would love if there is swing involved ( i read …

Member Avatar for JamesCherrill
0
145
Member Avatar for prnjn

I am making a ticket booking system. I have a databse with a clumn "booking status" I am thinking to use a map of seats ( with pictures controllers as seats) What i want is when the value in booking status is "booked" then the pictures shown as seats should …

Member Avatar for stultuske
0
152
Member Avatar for sankubha

am compiling the java program inside another javaprogram..... how to add an additional library to that conpiling java program....

0
128
Member Avatar for sankubha
Member Avatar for sankubha
0
109
Member Avatar for ZombieKnight93

This is what the assignment is: (Airline Reservations System) A small airline has just purchased a computer for its new automated reservations system. You have been asked to develop the new system. You are to write an application to assign seats on each flight of the airline's only plane (capacity: …

Member Avatar for ZombieKnight93
0
7K
Member Avatar for jess_35

I need to create a Java Temperature converter. I have everthing working except when I try to convert F to C I get nothing except the value in F field is changed to 32. The conversion for C to F is working fine. Any ideas what it coudl be?? import …

Member Avatar for JamesCherrill
0
281
Member Avatar for woomar

Is it possible to make some Junit tests that assertTrue (condition, throw some exeption) if condition was false or if condition would throw something, say assertEquals (codition, new Excepption) ?

Member Avatar for somjit{}
0
214
Member Avatar for sasikrishnasamy

Hi, I have code like this, public void method1(){ ArrayList<String> list=new ArrayList<String>(); list.add("A"); list.add("C"); list.add("D"); for(int i=0;i<list.size();i++){ if(i==0){ new Test().addB(list); } } System.out.println(list) } public void addB(ArrayList<String> list1) { list1.add(1,"B"); System.out.println(list1); } output: List1: A,B,C,D List : A,B,C,D I Expected this Result: List1: A,B,C,D List : A,C,D Why List1 is …

Member Avatar for JamesCherrill
0
303
Member Avatar for sarthak25

how to configure oracle datasource in jboss 5.0 ?? and then how can I use this datasource in hibernate.cfg.xml file to make connection to the database ?

0
161
Member Avatar for Hanyouslayer

Okay, I feel like I busted something in my head because I can't figure out anything in Java anymore! I just confused the crap out of myself, and I can't seem to get back on the horse. What I'm trying to do is read from a text file to create …

Member Avatar for JamesCherrill
0
341
Member Avatar for Pyler

This method is supposed to reverse a stack by making a new stack and pushing popped items from this stack to the revertStack and then returning the reverted stack. When I run some tests, it returns an empty stack in stead. Any clues? public LinkedStack<E> reversed() { LinkedStack<E> revertStack = …

Member Avatar for JamesCherrill
0
220
Member Avatar for woomar

If I have a chess board 8x8 And in my copy constructor I want to deep copy it. How would I go about doing it? This is what I have: public class chessBoard { private Chess[][]board; public chessBoard (){ board = new board[8][8]; for (int i = 0; i < …

Member Avatar for JamesCherrill
0
753
Member Avatar for mani_1991

hai friends, is it possible to generate barcodes using java....???? if it is possible how can i do that......??????? please give information about the how to developing barcode generator using java please any one can give solution for this..

Member Avatar for stultuske
0
214
Member Avatar for dogface13

Hi Daniweb community, I have implemented a node class, DoublyLinkedList class and a SinglyLinkedList class. For each DoublyLinkedList node created, there is supposed to be a reference to a NEW SinglyLinkedList. Meaning each DLL Node has its own SLL. I have such a reference created which is a single node …

Member Avatar for dogface13
0
293
Member Avatar for reincom

# How to show this loop inside a frame? # String R="Reserved"; String A="Available"; String name; int option; int roomNumber; int value=6; String reserveRoom[] = new String[value]; Scanner in = new Scanner(System.in); System.out.print("\n*****WELCOME!*****\n"); System.out.print("Enter your name:\n"); name=in.nextLine(); System.out.print("ROOM #. STATUS\n"); roomNumber=1; for(int i=1;i<value;i++) { reserveRoom[i]=A; System.out.println(" " +roomNumber + "\t …

Member Avatar for Dean_williams
0
188
Member Avatar for android_gl

i have a java project for my resume that i put it on github. and i want a fastest way to some one else to run my project. should i just put all my files there? likesrc, bin, .setting, etc... or should i just put 'src' files. or should i …

Member Avatar for JamesCherrill
0
306
Member Avatar for tindoh
Member Avatar for reincom

private class LogReserve extends JFrame{ public LogReserve(){ setTitle("Hotel Reservation"); setLayout(null); lblNTitle1 =new JLabel("RESERVATION SYSTEM"); lblNTitle1.setBounds(220,5,150,40); lblNTitle1.setBackground(Color.DARK_GRAY); lblNTitle1.setForeground(Color.BLACK); add(lblNTitle1); JLabel lblUsername =new JLabel("First Name:"); lblUsername.setBounds(55,30,80,40); lblUsername.setForeground(Color.DARK_GRAY); add(lblUsername); txtUsername=new JTextField(""); txtUsername.setBounds(130,39,150,22); add(txtUsername); JLabel lbllastname =new JLabel("Last Name:"); lbllastname.setBounds(310,30,80,40); lbllastname.setForeground(Color.DARK_GRAY); add(lbllastname); txtlastname=new JTextField(""); txtlastname.setBounds(390,40,150,22); add(txtlastname); JLabel lblBirthd =new JLabel("Check In Date:"); lblBirthd.setBounds(55,70,90,40); lblBirthd.setForeground(Color.DARK_GRAY); …

Member Avatar for reincom
0
1K
Member Avatar for Benjamin_4

Is it possible to populate my Jcombobox with my database column names? the name of my jcombobox is 'jComboBox_AReport' and the db_Table is 'asset_report'. please am still learning so i will appeciate the help THANK YOU!

Member Avatar for Matt_5
0
67
Member Avatar for donedeal

I'm trying to find out which of the following WEB/MOBILE Developing Tool. 1. ASP.NET 2. PHP 3. JAVA Which one of them is the best in terms of robust web application, tight Security, mobile application, database application, etc. I will like to know which one with reasons.

Member Avatar for irum niazi
0
339
Member Avatar for bhanu1607

Hi All, Can any one tell me the algorithm for MD5,SHA-256 encryption and decription. I can found MD5 emcryption but not unable to found decryption. Thanks & Regards Bhanu Teja M.

Member Avatar for gusano79
0
1K
Member Avatar for somjit{}

I'm a bit confused about the use of "for" in the above statement.( i read the line from the [oracle tutorials](http://docs.oracle.com/javase/tutorial/essential/concurrency/syncmeth.html) ) I suppose a thread has its run() method , inside which there is some code. That code might call a method **of** an object... and by this point …

Member Avatar for JamesCherrill
0
178
Member Avatar for reincom

` import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.net.URL; import javax.swing.JDesktopPane; import javax.swing.JFrame; import javax.swing.JInternalFrame; import javax.swing.JMenu; import javax.swing.JMenuBar; import javax.swing.JMenuItem; import javax.swing.JOptionPane; import javax.swing.SwingUtilities; public class Main1 extends JFrame{ JDesktopPane jdpDesktop; public Main1() { JFrame frame = new JFrame("MainForm"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); jdpDesktop = new JDesktopPane() { @Override public Dimension getPreferredSize() …

Member Avatar for JamesCherrill
0
195
Member Avatar for cleve23

Hi From the below code,the example is calling the dog object through the animal reference.But i do not understand why don't it call directly through the dog class as the reference? Thanks class Animal{ public void move(){ System.out.println("Animals can move"); } } class Dog extends Animal{ public void move(){ super.move(); …

Member Avatar for JamesCherrill
0
208
Member Avatar for Suvarna-25

Hi..... I have a java file to read excel file. I have stored all the elements of excel file in a variable. Now i want to show all values of excel file on jsp page in a table format. All elements are displaying on jsp page but in vertical line. …

Member Avatar for Suvarna-25
0
243
Member Avatar for firoz alam

friends we are going to make an auto dialer in Java itself so plz tell me how to initiate this thank you

Member Avatar for jwenting
0
254
Member Avatar for sarthak25
Member Avatar for Pyler

Reverse method won't work This method is supposed to return a copy of a this object, reversed. So it creates a new stack called that such that when all the items from this are popped onto that, this will reference that and the `reversed()` method will return this. When this …

Member Avatar for gusano79
0
259

The End.