36,051 Topics

Member Avatar for
Member Avatar for nira9

hiee friends i wanted to make one apllication i java which ca include maximum java syntax so i can learn it deeply please suggest some ideas and links for it.............thnkss in advance

Member Avatar for JamesCherrill
0
54
Member Avatar for saeef007

Write a Java program that prompts for an individual’s age and prompts him/her to pay the price of a train ticket based on the following conditions: If age is greater or equal to 12 but less than 65, Rs 375.75 is charged. If age is less than 12 but greater …

Member Avatar for nira9
-2
110
Member Avatar for noel9

hiee friends i want to do a web application in java for that i wnat some good creative ideas i havent make any web application but i do have knowledge about java so for dng this project where shld i start what shld i refere......plzzz give ur valuable suggestions... thanku:)

Member Avatar for JamesCherrill
0
102
Member Avatar for jagvllead

import java.io.Console; public class ConsoleDemo { public static void main(String[] args) { Console cnsl = null; String name = null; try{ // creates a console object cnsl = System.console(); // if console is not null if (cnsl != null) { // read line from the user input name = cnsl.readLine("Name: …

Member Avatar for JamesCherrill
0
1K
Member Avatar for techyworld

value="jdbc:mysql://localhost:8080/mkyongjava" i need to change this path so that it works at my place. where will I get this? <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="com.mysql.jdbc.Driver" /> <property name="url" value="jdbc:mysql://localhost:8080/mkyongjava" /> <property name="username" value="root" /> <property name="password" value="password" /> </bean>

Member Avatar for cool_zephyr
0
183
Member Avatar for techyworld

how to do a unit testing on this method? anyone can help plzz? public boolean saveOrUpdateUser(User user) { boolean res = false; try { this.getHibernateTemplate().saveOrUpdate(user); res = true; } catch (DataAccessException e) { res = false; this.logger.error("DataAccessException", e); } return res; }

Member Avatar for techyworld
0
139
Member Avatar for somjit{}

whats even more is that if i create any new file in the "src" folder of the project , it doesnt create any new bin folder to place the class file. i dont know where the class files are of the compiled source code . only when i manually `javac …

Member Avatar for somjit{}
0
4K
Member Avatar for Trap910

I am new into the computer Science..I just completed reading and understing the C programming language..I think am quite decent in it..Now I want to start studying a new programming language this semester, before I start, I want to get some advice from the experts, should I choose Java or …

Member Avatar for vegaseat
0
283
Member Avatar for RinzLove

Hi all, Really appreciate your help if my function on dijkstra algorithm is correct or wrong? Many thanks... Function Dijkstra(Graph, source): Graph randomGraphGenerator = new Graph: Source V0 = new Source: for each vertex n in randomGraphGenerator: // initializations weight[n] := infinity // Unknown path // function from source to …

Member Avatar for JamesCherrill
0
202
Member Avatar for durgesh1

hello all i tried to fetch data from databse and try to stored it in an array and i want to compare new value that come from database with array if this new value is already stored in this array i like to executed new query if not in array …

Member Avatar for durgesh1
0
242
Member Avatar for Rampee

Hi Dude, I need to design an application similar to windows media player. Many suggested to me JMF but my actual need is it should be exactly same as windows media player. In my swing window, I should have the capability to add/edit playlists. If double click it should get …

Member Avatar for JamesCherrill
0
125
Member Avatar for techyworld

Hi i need some help, how to unit test a DAO? here my code: @Transactional public class ProjectDaoImpl extends HibernateDaoSupport implements ProjectDao { Log logger = LogFactory.getLog(this.getClass()); private String message; /** * {@inheritDoc} */ public List<User> retrieveAll() { return this.getHibernateTemplate().loadAll(User.class); } /** * {@inheritDoc} */ public boolean saveOrUpdateUser(User user) { …

Member Avatar for techyworld
0
152
Member Avatar for MasterHacker110

I am trying to read all the files in a folder, if the file name == that of the name the user entered, the text of a button (that when on clicked will open the file) will be set to the file name. But my code for some reason doesn't …

Member Avatar for MasterHacker110
0
276
Member Avatar for sankubha

Am doing a client server project..... I have done it with desktop.. how to do the same thing in JSP and Servlets.... Thanks in Advance

Member Avatar for stultuske
0
138
Member Avatar for moone009

I would like split to some how split each item in the arry and sort it by Id[1] and then date[2] Been doing a fair amount of reading and cannot seem to figure this one out. Name,ID,Date John,432,2012-03-21 04:32:00 AM Bob,532,2012-01-01 12:12:00 AM Mike,932,2012-01-11 11:42:00 AM Mike,932,2012-05-01 12:13:00 AM John,1532,2012-01-11 …

Member Avatar for JamesCherrill
0
195
Member Avatar for darkenmac

Hey guys, I'm tring to develop an android application which will solve differentiation and intgration problems and show the steps to solving it. Like a learning tool for students. But the thing is i cant find a algo which will help me on solving integration. can u guys please help …

Member Avatar for DarkLightning7
0
141
Member Avatar for MasterHacker110

Ok so I have this problem: A friend that does a lot of online banking wants to keep track of their activity, so they save the "information" in a .docx file every time they are done. Now recently they have so many files that it is a hassle to search …

Member Avatar for MasterHacker110
0
179
Member Avatar for laguardian

Hey guys! I have this program I'm working on, but I keep getting an error in my main class. Here's what I have: import java.util.Scanner; public class TicketingSystem { public static void main(String[] args) { Game game = new Game(); Scanner input = new Scanner (System.in); String teamName; game.addTeam(new Team(teamName)); …

Member Avatar for somjit{}
0
140
Member Avatar for globaladchennai

this is Kavi ,i am doing MCA in Madras university, looking for best java base ieee project center in chennai,could any one help

Member Avatar for somjit{}
-3
199
Member Avatar for bob.henry.1884

//****************************// //*****DO NOT TOUCH THESE*****// //****************************// import java.util.*; import java.io.*; public class NumberGuessingGame{ public static int num; //variable to hold randomly generated number public static int guess; //variable to hold user inputs public static String ans; //variable to hold user input for y/n public static int guessnumber = 7; //variable …

Member Avatar for bob.henry.1884
0
252
Member Avatar for dalawh

I want to add different Enums to a single JComboBox. Here is how the code looks like. Type contains 3 different type of Enums(Colors, Shapes, Dimensions). final JComboBox typeJComboBox = new JComboBox(Type.Colors.values()); for(Type.Shapes shape: Type.Shapes.values()) { typeJComboBox .addItem(shape); } for(Type.Dimensions dimension : Type.Dimensions.values()) { typeJComboBox .addItem(dimension ); } What generic …

Member Avatar for JamesCherrill
0
811
Member Avatar for rwagnes

I am working on a class assignment in Java. According to the teacher's notes, a method in a sub-class that overrides the parent's method should be bold in the class diagram. I am using Visual Paradigm to create the class diagram, but I can't figure out how to bold a …

Member Avatar for jerry mcmartins
0
130
Member Avatar for sankubha
Member Avatar for JamesCherrill
0
397
Member Avatar for vimal_3

Hello, I have created below program and program is throwing FileNotFound exception when I pressed the submit button. The problem is coming due to JSP page is not able to find complete path of image. I have debug the JSP program and found that HTML form pass only image name …

Member Avatar for Trap910
0
198
Member Avatar for murali2489

Hi All, In MY GUI app, inside JFrame, i need to put two rows 8 column components first and then below i need to put one button in the center . I created one Jpanel having 2*8 grid layout and placed the components for two rows there and have put …

Member Avatar for murali2489
0
257
Member Avatar for Vaspar

Hello, I have made android application which provides remote desktop administration, I used port 5556 and socket programming TCP. I have to forward this port from router on every computer is there any other way so I can use some open port to communication with android device?? Like TeamViewer doesn't …

0
171
Member Avatar for crestaldin

[COLOR="navy"]I am trying to write a code to count the frequency of characters in a String; For example if I have String str = new String("This is a test"); I want to count the number of occurrence of each character in the string.(assuming the code is case insensitive) This is …

Member Avatar for JamesCherrill
0
435
Member Avatar for andre.gartner.56

I'm having quite a few errors on this one. This is my first attempt on "free" coding outside tutorials. I do believe it only has to do with bad use of brackets from my side, but i'm a beginner. Line 14 - Illegal start of expression Line 18 - Class, …

Member Avatar for JamesCherrill
0
159
Member Avatar for xxmp

I am making a website but the files are into folder a->b->c/bla.jsp is there any library that is free or a way that i can change the showing url to be more user friendly? Thank you

Member Avatar for xxmp
0
187
Member Avatar for Peter_Aye

Hi. Please could anyone help me look at this code and tell me why the image is not getting drawn? I have already cross-checked the path, and it is alright, as it does not throw any exception. Thanks in advance. class PotPanel extends JPanel{ public PotPanel(int width, int height){ Dimension …

Member Avatar for mKorbel
0
268
Member Avatar for Stuugie

Hi All, I'm trying to loop through and open PDFs in a folder using Java. I have the following code: import java.awt.Desktop; import java.io.File; import java.io.IOException; public class OpenPDFs { public static void main(String[] args) throws IOException { // TODO code application logic here String fp; fp ="S:\\Economic Forecasts\\Fcst13\\SourceForecasts\\"; File …

Member Avatar for Stuugie
0
594
Member Avatar for sankubha

I have renderer a JPanel at the fourth column of my JTable. I need to draw an image Dynamically. I have used this code to get the component...... at certain row and column..... JPanel cPanel = (JPanel) jTable.getCellRenderer(0, 4).getTableCellRendererComponent(jTable, jTable.getValueAt(0, 4), false, false, 0, 4); Graphics graphics = cPanel.getGraphics(); When …

Member Avatar for sankubha
0
241
Member Avatar for RinzLove

Hi all, I've a problem fixing the syntax error. I'm doing a function, randomGraphGenerator(int n) that will generate non-negative weighted complete graph with n vertices. Could you help me out on this. Many thanks in advance... public class randomGraphGenerator { private final int n; private int E; Private Bag<Edge>[] adj; …

Member Avatar for JamesCherrill
0
336
Member Avatar for jakarias
Member Avatar for jwenting
0
223
Member Avatar for cool_zephyr

how to make a bean application scoped so that it will persist as long as the web application is running??? and how can we access it in our controller?? thank you

Member Avatar for masijade
0
220
Member Avatar for Petranilla

Hi Everyone, I'm doing a 2D PAcman in Java. Can anyone tell, why the screen gets mess up when I display the moster. I simply use set bound enemy.setBounds(x1,x2,50,50); How do I manage to include the monster without destroring the scren. Many thanks.

Member Avatar for Petranilla
0
720
Member Avatar for akhilchandranms
Member Avatar for jakubee

Hi All, I have a question. Is adding/filling range numbers to an ArrayList possible in java?? Like this: {<12345, 13455>, <12745, 13755>, <2345, 2755>, <5345, 9455>, <2700, 5240>, <345, 13455>, <11345, 13000>} You can think of these like time segments. Here is the class to give you brief idea import …

Member Avatar for tux4life
0
370
Member Avatar for navi84

I am geeting syntax errot insert while ( expression ) to complete Do statement. Please help...Below is the complete coding in Webdriver. @Test public void testUntitled() throws Exception { driver.get(baseUrl + "eforms/admin.aspx"); driver.findElement(By.cssSelector("button.gskButton")).click(); new Select(driver.findElement(By.id("ctl00_PersonSearch_CountryList"))).selectByVisibleText("Russian Federation"); driver.findElement(By.id("PersonSearch.SearchFor.Person.gskPreferredName")).clear(); driver.findElement(By.id("PersonSearch.SearchFor.Person.gskPreferredName")).sendKeys("slawomir"); driver.findElement(By.id("btnPersonSelectSearch")).click(); driver.findElement(By.id("btnPage1")).click(); driver.findElement(By.id("sys44708")).click(); new Select(driver.findElement(By.id("ctl00_pageBody_Form_ID"))).selectByVisibleText("Expense Report"); driver.findElement(By.xpath("(//button[@type='button'])[2]")).click(); // ERROR: Caught exception [ERROR: …

Member Avatar for jwenting
0
935
Member Avatar for sankubha

I am Using tablecellrendere for a table to add a JPanel at the fourth column.... It is adding to all ..... But i want to add a textfield at first row only....

Member Avatar for mKorbel
0
991
Member Avatar for purity_1

how can i come up with a code in java that shows the number of apartments in a block, the number of blocks in the estate and AT the same time show the cost of renting an apartment the name of the tenant in the apartment and how i can …

Member Avatar for JamesCherrill
0
152
Member Avatar for sammygreat1234

Hi All Kindly assist am having issue with the following code, where did i get it wrong? Only the first Block condition is execute, even if B<PA, the second block does not execute. Am using Netbean PA =((1.1 * P2) / (1.46 * P3)); B = 3 * P4; D …

Member Avatar for JamesCherrill
0
113
Member Avatar for techyworld

hi am developing an application on java using JSF framework. I'm making some changes in my css file,but it's not applying the changes in browser. am using myeclipse spring 10.6 and tomcat 7.0.41. Anyone can help? because yesterday i was working on the same css file, and i was able …

Member Avatar for chandrasekhar1
0
148
Member Avatar for joseph.lyons.754

Hey Guys, What i want it to do : 1. Combobox is displayed with a list of countys ie Limerick Dublin Cork 2. Choose County brings up second Combobox with countys towns and villages. 3. Hit search brings up relevant towns and vilages from the county chosen. What it does: …

Member Avatar for joseph.lyons.754
0
291
Member Avatar for Vish0203

Hi, I was working on an application but i'm stuck at a point now.. I'm able to send the chat messages but unable to receive any... I have two threads, 1 for sending message and another for receiving but receiving part isn't working! I think the problem is with multithreading! …

Member Avatar for Absaar
0
287
Member Avatar for ExtraKanin

Hello everyone. I'm having trouble about Internal JFrames as my code is compiling but it doesn't run. Can someone give me an advice as to how to make it work? Also the reason why I wanted to make internal JFrames is that I'm using layout managers on my panels so …

Member Avatar for JamesCherrill
0
135
Member Avatar for Priti_P

Hello, Am new in Struct I followed link http://www.tutorialspoint.com/struts_2/struts_examples.htm for making simple hello project in struts using eclipse but when i complete the coding and go for the execution, when I write the word in that box as an input (for saying hello). and click on Say Hello button, it …

Member Avatar for stultuske
0
311
Member Avatar for murali2489

Hi All, I have just finished reading fundamental topics in Java and now i have decided to do a New Project in Java which comprises all basic features of Java. I need help in Understanding/visualizing the architecture / Design model for my Project. Specification is : 1 . Develop a …

Member Avatar for stultuske
0
324
Member Avatar for durgesh1

hello all i need to fetch data from two column let me tell how i like to fetch this,i have two table first column is **ledger** in which there is **groupname,balance**.now in seconed table whic name is **groupcreate**,here is **under and name column** heare you *****can create your own group …

Member Avatar for 1stDAN
0
173
Member Avatar for joeymenje

First off this is for my little server, and i am having a problem. this is saying im missing a statment but i dont see how. if you can take 5mins to look over this and tell me what you see i did wrong, it will make my day. look …

Member Avatar for JamesCherrill
0
145

The End.