35,618 Topics

Member Avatar for
Member Avatar for ramjeev

Reverse words in the sentence without using any Java API or new array Eg. Input => 'this is the wonderfull island' Output => 'island wonderfull the is this' If any logic, pls let me know -- thanks, ramjeev

Member Avatar for jon.kiparsky
0
218
Member Avatar for djbhoco

I am having problems with the following code. Here is my assignment for this week, Write the program in Java (with a GUI) and have it calculate and display the mortgage payment amount from user input of the amount of the mortgage, the term of the mortgage, and the interest …

Member Avatar for jon.kiparsky
0
333
Member Avatar for nur_ahm4d

Hi, I was wonder if someone could give me some help with my program I have a variable: "playing football" and i want to split that into chars like so, 'playing', 'football' can you help me???

Member Avatar for jon.kiparsky
0
242
Member Avatar for white feather

Is there a way to add a user to a group in J2EE dynamically (using glassfish btw)? If so, is there a away to have a user in a group called members to be promoted to an admin group. Thanks in advance

0
148
Member Avatar for Xeros606

I've been learning Java here and there for the past few years from high school classes, but I don't know if I have enough knowledge of programming to actually make something useful. What do you think someone should know to be considered a beginning programmer? I'm just trying to gauge …

Member Avatar for jon.kiparsky
0
107
Member Avatar for glenak

Hi, this is a very strange problem for me. I'm writing an app that uses the BouncyCastle API. I downloaded the jar file from their website and I put it in my project build path so as to use it, and it works. However, when I try to run the …

Member Avatar for NormR1
0
9K
Member Avatar for neo_31591

readLine() returns string type.... i have a file of usernames and passwords and am trying to check the username as when entered into login page..... [code=java] InputStreamReader i1=new InputStreamReader(new FileInputStream("usr")); BufferedReader b=new BufferedReader(i1); String str; str=b.readLine(); for(int i=0;i<str.length;i++) if(str[i]==("USERNAME: "+Login.usr)) { bool=true; } [/code] now i know im trying to …

Member Avatar for JamesCherrill
0
102
Member Avatar for rowley4

I need to write an Array List of Pets. An item list is either a Dog or a Cat. For each pet enter a name and type (C for cat or D for dog). Input should stop when the word STOP is entered for the name. I need to also …

Member Avatar for NormR1
0
2K
Member Avatar for BboyRodimus

Here's the prompt guys: Assignment #4 will be the construction of 2 new classes and a driver program (the class containing a main method). [B]Address class[/B] The Address class describes cpu of a bank. It has following attributes: Attribute name Attribute type Description city String the city of the bank …

Member Avatar for NormR1
0
279
Member Avatar for Megha SR
Member Avatar for Xufyan
0
117
Member Avatar for ahsan1

I have downloaded stanford parser package from web because I want to use it in my java program. I don't know that in which subfolder of jdk 1.5.0_22 should I extract the .rar files of stanford parser. Can any one tell me. I'll be thankful.

Member Avatar for peter_budo
0
65
Member Avatar for Shaaani

i wanna ask another thing i have created an applet which has one main file and 7 other class files now i want to connect it to database the following code is in class file on compiling it gives access control exception... [code]private boolean spellCheck(String spell) { Connection Conn; Statement …

Member Avatar for peter_budo
0
109
Member Avatar for Megha SR

hello. i have done the followinh program to convert a String value to a double value.when i am compiling this program, i get an error as"unclosed character literal in the 18th line.can anyone say what's the problem? import java.io.*; class strin { public static String a(String s); { String j=""; …

Member Avatar for jon.kiparsky
0
125
Member Avatar for NewOrder

i know what an interface is. but i dont understand what the use of connecting the objective reference to the interface method and then use it to implement.. could someone explain to me the code..whats going on/ [CODE] interface TextReceiver { void receiveText( String text ); } class TickerTape implements …

Member Avatar for NewOrder
0
118
Member Avatar for glenak

Ok, I'm really confused here. I know that the only way to transfer objects via input/output streams is if they are serialised. If i wanted to transfer objects of my Person class from my client to server, I would have to implement "serializable" in my Person class. That's all well …

Member Avatar for glenak
0
137
Member Avatar for Shaaani

Here is the code... Problem is that it shows a message retCode is not initialized if i written last line in try block it shows return error i dun understand wat to do now plz friends help me private boolean spellCheck(String spell) { Connection Conn; Statement Stat; ResultSet Rs; String …

Member Avatar for NormR1
0
124
Member Avatar for nssltd

Hey i have made a basic chat application in Java using the code from killer game programming in Java. but the problem with this is its just a big open CHAT ROOM so that anyone can log in and just talk/spam. i was wondering how to make a private chat …

Member Avatar for ravi thakur
0
63
Member Avatar for thilinam

Hello everybody. I'm new to java programming. These days I'm developing a client server application using java. Client side is at most finish now. Server side logic is also designed and implemented successfully. But I'm in a trouble regarding following stuff. The server runs an infinite loop. it always checking …

Member Avatar for JamesCherrill
0
110
Member Avatar for rayden150

I was wondering if i could incorporate swing, into the code to create a GUI?: [CODE]public class ComputerMerchandise { public static void main(String[] args) { java.util.Hashtable<Integer, Product> htProducts = new java.util.Hashtable<Integer, Product>(); for(Product product:Products.GetAllAvailableProduct()) { htProducts.put(product.getProductId(),product); System.out.println(product.toString()); } Hashtable<Integer,Integer> orders = new Hashtable<Integer,Integer>(); java.util.Scanner scanner = new Scanner(System.in); while(true) { …

Member Avatar for tong1
0
190
Member Avatar for BboyRodimus

I'm writing two classes for the main program code. I'm stuck trying to do figure out how to instantiate an object of the class Address: [B]Address class:[/B] [CODE]public class Address { private String city; private String state; public Address() { city = "?"; state = "?"; } public Address(String aCity, …

Member Avatar for sneaker
0
1K
Member Avatar for kesh1000

hi all im writing a website for a life insurance agency as a final year project and i need the system to have a mechanism of an online payment system. i have no idea how to create it. could anyone lead me to a tutorial or something which can help. …

Member Avatar for kesh1000
0
585
Member Avatar for neo_31591

ok so the thing is im trying to save information from a register page into a file [code=java] else if(ae.getSource()==b1) { fname=t1.getText(); lname=t2.getText(); rol=t3.getText(); branch=cb1.getSelectedItem().toString(); username=t5.getText(); password=t6.getText(); username.savedata(); setVisible(false); } [/code] the username file is--- [code=java] package Proj; import java.io.*; public class username { public static void savedata() { try …

Member Avatar for neo_31591
0
100
Member Avatar for abhikr7891

hey , my question is that suppose we have an application runnig . it has a jlabel with some text and now in some function i change the text by using setText()func and continue with some other stuff in the function , now the text that i changed is not …

Member Avatar for abhikr7891
0
211
Member Avatar for Xufyan

i've made the following program that count how many times the input character is appeared in a string. [CODE]import java.io.*; class strngcls{ public static void main (String args[])throws IOException{ String s1,s2; char ch; InputStreamReader ir = new InputStreamReader (System.in); BufferedReader br = new BufferedReader (ir); System.out.println ("Type any Sentence: "); …

Member Avatar for NormR1
0
137
Member Avatar for ausops

okay, I'm trying to create a new instance of SimpleCanvas through the FlagDrawer object. I need the SimpleCanvas to be scalable. I can only use the two instance variables and one constructor given to me. What I'm trying to do now is take the class instance variable (int) size and …

Member Avatar for NormR1
0
81
Member Avatar for KatWoman27

I need help on this two assignments: # 1- Write a client and server, Java Swing application using socket connections that allows the client to specify a filename to the server in a Textfield and the server send the contents of the file back to the client if it exists. …

Member Avatar for NormR1
0
99
Member Avatar for churva_churva

[CODE]import java.util.Scanner; public class StudentList{ public static void main(String [] args){ Scanner console=new Scanner(System.in); String students[]=new String [10]; System.out.println("Enter names of students"); for(int i=0;i<students.length;i++) students[i]=console.nextInt(); System.out.println("Students entered are"); for(int i=0;i<students.length;i++) System.out.println(students[i]); } }[/CODE]

Member Avatar for VernonDozier
-1
128
Member Avatar for spv03

package com.inventory.servlet; pst=con.prepareStatement("insert into onscreen_record (add_name, price, zone, cinema, audi, priority, start_date, end_date, length_min, length_sec, client_detail)values(?,?,?,?,?,?,?,?,?,?,?)"); System.out.println(audi); pst.setString(1,add); pst.setString(2,price); pst.setString(3,"ok"); pst.setString(4,cinema[0]); for (int x=0;x<audi.length;x++){ pst.addBatch(); pst.setString(5,audi[x]); } pst.setString(6,position); pst.setString(7,sdate); pst.setString(8,edate); pst.setString(9,min); pst.setString(10,sec); pst.setString(11, client); pst.executeUpdate();

Member Avatar for ~s.o.s~
0
81
Member Avatar for sprankitoy

Hi everyone! you can call me sprankitoy. I am a software developer. I'm a newbie in this discussion community so I might need your expertise should problems arise in the future. I'll be thrilled to answer questions and topics I can relate of specially regarding Java programming and RCP/RAP platforms. …

0
27
Member Avatar for Xufyan

MY question is, like we do for integer and float, Integer.parseInt(args[0]) Float.parseFloat(args[1]) How do we take character input from command line ?

Member Avatar for HeidiC
0
451

The End.