36,051 Topics

Member Avatar for
Member Avatar for gowri123

Hi, this is harika.. i am getting a great confusion in differce b/w request, session, application attribute.. can anyone help me out by giving an example in jsp in what way they differ from eachother..

Member Avatar for april88t
0
79
Member Avatar for sk8ergirl

I'm almost done with my assignement I've created 2 class and I have one format method in student class the file look like this (there are about 25 lines) courseNum courseName courseSemester studentID,studentProgram,studentGpa studentID,studentProgram,studentGpa the output should look like this courseNum courseName courseSemester studentID--studentProgram--studentGpa studentID--studentProgram--studentGpa I'm still not sure if …

Member Avatar for tux4life
0
253
Member Avatar for toldav

I just need help to display my initial value of 25000 when the loop runs and print the years. I need the year 1 to be the initial value without doing the percent first. Also my print format doesnot display the $ and the headers. Any guide to the right …

Member Avatar for toldav
0
177
Member Avatar for dicknballs

i am working on a program called myBalls. so far, heres what i have import java.util.Scanner; public class Penis { private int length; public Penis() {} public void setPenisLength(int l) { length = l; } public int penisLength() { return length; } } public class myBalls extends Penis{ public static …

Member Avatar for tux4life
0
650
Member Avatar for StefanRafa0

Hello guys im working on program and i stucked at database i need to create some place that will save all information of Account (in some file if can) then read it every time user "Log in" in the program. I tryed searching but i cant get it ... Please …

Member Avatar for tux4life
0
359
Member Avatar for Violet_82

hi all, I need to draw a series (10) concentric circles starting fromt he middle of the panel. This is what I have done, do you reckon it is ok? //Ovals.java import java.awt.Graphics; import javax.swing.JPanel; public class Ovals extends JPanel{ public void paintCmponent(Graphics g){ super.paintComponent(g); //calculates the centre of the …

Member Avatar for Violet_82
0
3K
Member Avatar for bhadra.anurag

import java.io.*; class pattern { public static void main(String args[]) throws IOException { int n; BufferedReader br = new BufferedReader(InputStreamReader(System.in())); System.out.println("Please Enter Your Pattern Length:- "); n = Integer.parseInt(br.readLine()); while(n>2) { for(int i=0;i<=n;i++) { if((i==1)||(i==n)) { for(int k=0;k<=n;k++){ System.out.print("*"); System.out.println(); } } else { int o = n-2; System.out.print("*"); for(int …

Member Avatar for stultuske
0
703
Member Avatar for uurcnyldrm

Hi everyone, I'm using the following code snippet to download and save a file from an address using Java... URL website = new URL("http://www.website.com/example.torrent"); ReadableByteChannel rbc = Channels.newChannel(website.openStream()); FileOutputStream fos = new FileOutputStream("example.torrent"); fos.getChannel().transferFrom(rbc, 0, 1 << 24); However, a problem occurs when I try to download a file with …

Member Avatar for uurcnyldrm
0
227
Member Avatar for baneyramos_09

? missing return statement! hi guys, Im trying to compile this class below, but its just not working, it keeps sating 'missing return statement' int the method declaration line. Can u see to check if there is anything missing in my code or if iv done something wrong?? Thanks! [code]public …

Member Avatar for stultuske
0
262
Member Avatar for mickky

can anyone plese tell me how to make installable file of a java program using visual studio 2010 professional.?

Member Avatar for mickky
0
86
Member Avatar for chaitanya_krish

how to call different java method based on html select option choice? any code sample? basically, user will select a dropdown option and press submit. for each option,different query should be executed. using mysql DB and netbeans IDE. Thanks !!!

Member Avatar for stultuske
0
215
Member Avatar for 2344235643

Two different questions 6) write an application that displays the result of dividing two numbers and displays any remainder.the main () method prompts the user for values and sends them to the dividing method; the dividing method the calculation and displays the results. 8) Write an application that cal calculates …

Member Avatar for stultuske
-4
187
Member Avatar for DarkVision

hi guy i would like help or info about socket little exemple of code: clientSocket = new Socket(ip, 6784); BufferedReader insideServer = new BufferedReader( new InputStreamReader(clientSocket.getInputStream())); its that possible from the inputStream getting the click event ? example a user click from a button and another user using same application …

Member Avatar for radhakrishna.p
0
114
Member Avatar for mshauny

I having been working on java web-start applet for serial communication which I now need to integrate and make it invoke able from an ASP .NET webpage / application. I have tried numerous ways of doing this which all have not yielded anything progressive. including but not limited to the …

Member Avatar for JohnnyCash
0
453
Member Avatar for jahanruhi3@gmai

how to update databse in remote machine,i am having .sql file which i have to update my database schema in remote machine,client will provide me his machine ip address,database username,database password,database instance name...pls help me pls package com.prion.testConnectivity; import java.io.BufferedReader; import java.io.FileReader; import java.io.Reader; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; …

Member Avatar for jahanruhi3@gmai
0
301
Member Avatar for edensigauke

where can i get help on programming an SMS server center in java. I also need to know if it is applicable in Second Generation Technology. If there is anyone who knows how these things run please advise me. Urgent

Member Avatar for stultuske
0
86
Member Avatar for nickcolb

I'm somewhat new to Java and programming in general and I am receiving this error when I run my program and I have zero idea as to what is causing it. Thanks in advance. [CODE]public class AssignmentEight { static final String INFILE_NAME = "ass8_input.txt"; /** * @param args */ public …

Member Avatar for stultuske
0
5K
Member Avatar for ranu jain

hello friends .this code have error-ARRAY OUT OF BOUND BUT I AM UANBLE TO FIND WHERE IS IT AND HOW TO REMOVE IT.. PLEASE GIV ME SOLUTION AS SOON AS POSSIBE. //import java.util.Scanner; import java.lang.System; class PascalTri { //public static void main(String[] args) { // TODO Auto-generated method stub //Scanner …

Member Avatar for stultuske
-2
133
Member Avatar for riahc3

Hello Im currently creating BMPs as a bufferedimage as following: BufferedImage bufferedImage = new BufferedImage(320, 320, BufferedImage.TYPE_INT_RGB); Thing is that black and white is more than enough for me so would I do this: BufferedImage bufferedImage = new BufferedImage(320, 320, BufferedImage.TYPE_BYTE_BINARY); ? Thanks

Member Avatar for riahc3
0
86
Member Avatar for hinterface

class Temp { static int []years={-80000,-79950,20,70,22,60,58,60,58,65,1950,2005}; public static int max_year(int x,int y) { int i=0; int j=0; int m=0; int n=0; int z=0; while(x<y) { z=(x+y)/2; for(i=0;i<=11;i=i+2) { if((years[i]<z) && (years[i+1]>x)) { m=m+1; } if((years[i]<y) && (years[i+1]>z)) { n=n+1; } } if(m>n) { y=z; } else { x=z; } } …

Member Avatar for S N Prasad Rao
0
113
Member Avatar for hwoarang69

how can i convert int to char or string now les say: i want to convert int to char ex: int a = 3 char b = '3' note they both are same number or int to String int a = 35; String c = "35"; note i already tried …

Member Avatar for jalpesh_007
0
298
Member Avatar for ray.chappel

I have been working on this assignment for a while now and I can't figure this one issue out. I was given four files, Name.java, SortableArrayList.java, NameListDriver.java, and SortableArrayListWithBubbleSort.java. The program is meant to take a text file with a list of names and sort them alphabetically. Part one of …

Member Avatar for ray.chappel
0
379
Member Avatar for hinterface

class Temp22 { static int []years={-80000,-79950,20,70,22,60,58,60,58,65,1950,2005}; public static int[] findMaxdinosaur(int[] years) { int[] count = new int[(years.length)/2]; int i=0; int j=0; int k=0; for(i=0;i<years.length;i=i+2) { int m=0; { for(j=0;j<years.length;j=j+2) { if(years[i]>years[j+2]) { m=m+1; } } } { count[k]=m; k=k+1; } } return count; } public static void main(String...s) { int[] …

Member Avatar for hinterface
-1
104
Member Avatar for Andy_01

Hello, I'm trying to fill a shape using TexturePaint in java. However when i'm running the codes i'm having the following errors: Exception in thread "main" java.lang.Error: Unresolved compilation problems: ImageIO cannot be resolved IOException cannot be resolved to a type at Textures. import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Rectangle; import …

Member Avatar for Lucaci Andrew
0
475
Member Avatar for ct2944

How to solve java.lang.NoSuchMethodError: main Exception in thread "main" when i run it produce Exception in thread "main" java.lang.NoSuchMethodError:main this is coding import java.awt.; import java.applet.; public class Sepah extends Applet{ public void paint(Graphics g){ g.setColor(Color.green); g.drawLine(100,100,10,140); g.drawLine(100,100,150,120); g.drawLine(290,120,400,130); g.drawLine(410,130,500,100); g.setColor(Color.black); g.drawLine(150,80,220,40); g.drawLine(220,40,290,80); g.setColor(Color.yellow); g.fillRect(150,80,140,140); g.setColor(Color.orange); g.fillRect(170,110,40,40); g.setColor(Color.orange); g.fillRect(230,110,40,40); g.setColor(Color.black); …

Member Avatar for adikimicky
0
101
Member Avatar for razor2890

Hey guys!!! Just found this wonderful forum.....Thanks for the guys who run this forum.. I am an Elec. & Telecom engineer... I understand Java Programming & I have more than 90% of the concepts of core-java and good knowledge of jsp,servlets,struts....I have some basic knowledge of oracle.... I have a …

Member Avatar for razor2890
0
271
Member Avatar for dreamslct

**Hi forum, I've got a question for the pros. I am making a program that has map<String, String> map = new TreeMap<String, String>(); and a Scanner to read a file contains some data which is assigned to map.put(); method. The data is something like this: UK USA Canada Australia etc. …

Member Avatar for dreamslct
0
238
Member Avatar for macdunk11

I am trying to read in from a .dat file, which includes a list of names a line of asterisks and a list of numbers, JUST the names in the file into nodes to be used in a linked list. All of the names will be before the line of …

Member Avatar for Lucaci Andrew
0
5K
Member Avatar for harinath_2007

Hi folks. I am trying to learn J2EE and I am looking for a complete J2EE tutorials online. Plz suggest me some links where i can learn the J2EE completely(if not 100%, atleast 90%) . It will be pleasure if the tutorials are FREE as i cant afford to pay …

Member Avatar for harinath_2007
1
121
Member Avatar for sk8ergirl

hi I'm working on my hw and I have problem I know how to read file from data and split each line using array now I want to use arrayList .. I want to read the data from the file and create arrayList and then split each line and create …

Member Avatar for tux4life
0
777
Member Avatar for sk8ergirl

hi I'm working on my hw and I have problem I know how to read file from data and split each line using array now I want to use arrayList .. I want to read the data from the file and create arrayList and then split each line and create …

Member Avatar for tux4life
0
159
Member Avatar for Jon BH

Hi I'm trying to locate some java that will allow a preview images, and float large display on roll over. The setup will be a list of customers and a small thumbnail. On rollover a large image centre screen on top with a text description below. Mouse out will clear …

Member Avatar for Jon BH
0
124
Member Avatar for initialise

Hi All, I have two major problems and they may or may not be linked. My main problem is with an application that I am creating. So far, I have only created the GUI using Netbeans 6.8. When I run the app through Netbeans then everything works fine. However, when …

Member Avatar for adisri
0
448
Member Avatar for erms

Hello, This is what I'm doing: 1. Get an image from a source 2. Get mouse position 3. Put a mouse Image on original image 4. Resave The code to get the image is working and saving it the "first" time But the code after that seems to not work …

0
85
Member Avatar for mateusz.baran1

Hello I would like to ask how to change button "Open" to "save" when iam using JFileChooser public void actionPerformed(ActionEvent e) { Object zrodlo =e.getSource(); if(zrodlo == mSave)//zapisywanie pliku { JFileChooser fc = new JFileChooser(); fc.setSelectedFile(new File(fileName)); fc.setFileSelectionMode(JFileChooser.FILES_ONLY); FileNameExtensionFilter filter = new FileNameExtensionFilter( ".txt and .java files", "txt"); fc.setFileFilter(filter); if …

Member Avatar for mateusz.baran1
0
1K
Member Avatar for Violet_82

hi chaps, I would like to do this exercise taken from the deitel and deitel book, chap 4 exercise 4.38, in brief: "Write an application that reads a 4 digit int and encrypt it replacing each digit with the result of addin 7 to it and getting the reminder after …

Member Avatar for Violet_82
0
580
Member Avatar for jinjin05

Hi! i'm having a problem installing Egit on Eclipse. When i add the link http://download.eclipse.org/egit/updates , there are errors saying: unable to read repository at http://download.eclipse.org/egit/updates/content.xml connection to http://download.eclipse.org/egit/updates/p2.index failed did i miss something that I need to install or configure? i need your help, thanks!

Member Avatar for tomwatson2
0
143
Member Avatar for hinterface

We are given an array of 2n integers wherein each pair in this array of integers represents the year of birth and the year of death of a dinosaurs respectively. The range of valid years we want to consider is [-100000 to 2005]. For example, if the input was: -80000 …

Member Avatar for stultuske
-1
100
Member Avatar for sky27
Member Avatar for pzuurveen
0
30
Member Avatar for jinjin05

Hi! i'm having a problem installing Egit on Eclipse. When i add the link http://download.eclipse.org/egit/updates , there are errors saying: unable to read repository at http://download.eclipse.org/egit/updates/content.xml connection to http://download.eclipse.org/egit/updates/p2.index failed did i miss something that I need to install or configure? i need your help, thanks!

0
45
Member Avatar for codechrysalis

Hi everyone I have a issue where I have written the entire program but couple little tweaks are needed for me to get the program done. I have my super class here "Pet". I have created couple objects in Main, "myRobin" , "myCow", "myBlackMamba" and passed some arguments to them. …

Member Avatar for codechrysalis
1
168
Member Avatar for Violet_82

Hi there, I have opened another thread even if the program is very similar. I have modified some code I have produced earlier and now I am getting some runtime errors, and I can't quite understand why. Now, here's the code: EmployeeClass.java public class EmployeeClass{ private String firstName; private String …

Member Avatar for Violet_82
0
4K
Member Avatar for jasonmark238

Hi friends. What are applets in java. What are the advantages of Applets over stanalone programs. Please give me the better way to learning applets easy, because dificult to remembering. Please help me. Thanks & Regards Jasonmark Rxdrugonlinestore

Member Avatar for <M/>
0
203
Member Avatar for yup790

I have tried looping through the text file but all it does is read the first line. I tried linefilereader but it still only reads the first line. int word_chooser = (int) (Math.random()*300); LineNumberReader r = new LineNumberReader(new FileReader("words.txt")); r.setLineNumber(word_chooser); word = r.readLine();

Member Avatar for stultuske
0
417
Member Avatar for hwoarang69

i cant seem to create my java project into jar files so any one can run it. i have a folder with 10 java files and two folder and some images and music. take a look at my project files tree. its on a image. ![tree](/attachments/small/3/tree.jpg "align-right") i google it …

Member Avatar for hwoarang69
0
172
Member Avatar for deadsolo

Hi there, I am having some trouble with a regex and am hoping on one of you great folks can assist me. I am very weak with regular expressions just to give you guys a heads up. Here is the text I am using a regex on: Control flow 6881 …

Member Avatar for deadsolo
0
299
Member Avatar for Forte1292

Alright so in my Data Structures class we have a program due sometime next week. I pretty much know how I'm going to do it, but I need help with one method of the program. I need a way to go through every possible order of 6 unique numbers. I …

Member Avatar for Forte1292
0
332
Member Avatar for Aditya_4

package display; import java.io.File; class display { int file=0, directory=0; void list(String path) { File root = new File(path); File[] f1 = root.listFiles(); for (File S : f1) //error { if(S.isDirectory()) { list(S.getAbsolutePath());//error directory++; } else if(S.isFile()) { file++; } } } } package display; public class displaymain { public …

Member Avatar for IIM
0
268
Member Avatar for ibra.kitandwe
Member Avatar for jasonmark238

What are the advantages of interfaces in java over calsses. Please give me reply and mention interface importance in java. Thanks & Regards Jasonmark

Member Avatar for stultuske
-1
214

The End.