32,199 Topics

Member Avatar for
Member Avatar for moaz.amin.37

My code is not compile and run Code is Below import java.util.Scanner; class Input { public static void main(String arg[]) { int rno; System.out.print("Enter Your Name = "); System.in.nextInt(rno); } } i think if System.out.println() is run then upper code should have to run but not run please solve this …

Member Avatar for moaz.amin.37
0
550
Member Avatar for Asabre

Write a java application that uses random-number generation to create sentences. Use four arrays of strings called article, noun, verb and preposition. Create a sentence by selecting a word at random from each array in the following order: article, noun, verb, preposition, article and noun. As each word is picked, …

Member Avatar for JamesCherrill
0
461
Member Avatar for sing1006

i have 2 class for example class a and class b. i need the string store at class a pass and use by class b, here is my code for class a and class b. class a public void actionPerformed(ActionEvent arg0) { JFileChooser fileChooser = new JFileChooser(); fileChooser.setFileFilter(new FileNameExtensionFilter("Text Files", …

Member Avatar for iamthwee
0
310
Member Avatar for nutandevjoshi

COME ON I HEARD "YOU CAN SPECIFY WHAT CLASS SHOULD DO,NOT HOW".BUT WITHOUT INTERFACE ,EXTREME JAVA PROJECTS CAN BE MADE!! WHY TO MAKE COMPLICATION USING INTERFACE?

Member Avatar for iamthwee
-2
162
Member Avatar for TheFearful

I am new to Java and am experimenting with the language. I am looking a way to convert a user-inputted date and convert it to the MSexcel format. So 1998/07/05 is 35981. Any clue on how to do this? This is what I have so far import java.util.*; import java.text.*; …

Member Avatar for TheFearful
0
224
Member Avatar for moaz.amin.37

My question is that what is ".in" in system.in and i am not understandin the workin of System.in suppose Scanner obj=new Scanner(System.in); plz understand me the working of upper line.

Member Avatar for JamesCherrill
0
129
Member Avatar for masonketcham

I've got all my parts to inventory part 5 to compile successfully but when I go to run the program I get this message, I am unsure what to do. I know that it possibly means something to do with the image. I've checked the errors that came back and …

Member Avatar for stultuske
0
136
Member Avatar for xxmp

I opened a website business but i am programming at jsf mostly for big sites. Is there any good JAVA VPS or virtual Java server that i can buy because now i can not buy a server and set it up. Do you know any good one that i can …

Member Avatar for peter_budo
0
74
Member Avatar for souad

I have a lookup table that contains 2 columns k_id, keywords as follow k_id | keywords 1 | hi 2 | play and so on I want to create another table using the previous lookup table where I want to put the k_id values as the columns of the other …

0
92
Member Avatar for Slavi

Okay, so I have the following while(!connected){ if (details){ System.out.println("connected"); defaultHost = tfServer.getText(); defaultPort = Integer.parseInt(tfPort.getText()); program.run(); } System.out.println("Not connected"); } where details is true when a button is clicked. This works fine expect that my console is getting spammed by "Not connected" until I press the button and details …

Member Avatar for JamesCherrill
0
109
Member Avatar for Slavi

So, I've been making a gui for a client to connect to a server using it. What I want is when I press Login to connect with the specfied Server address and port name on the gui. If I have hardcoded the Server and port it works but I don't …

Member Avatar for Slavi
0
196
Member Avatar for sing1006

JMenuItem mntmLoad = new JMenuItem("Load"); mntmLoad.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent arg0) { JFileChooser chooser = new JFileChooser(); chooser.setMultiSelectionEnabled(true); int option = chooser.showOpenDialog(testgui.this); if (option == JFileChooser.APPROVE_OPTION) { File[] sf = chooser.getSelectedFiles(); String filelist = "nothing"; if (sf.length > 0) filelist = sf[0].getName(); for (int i = 1; i < …

Member Avatar for sing1006
0
796
Member Avatar for Halkawt.Papula

in below code , how can remove -1-1-1 ... in output this code a want output is equall 5 4 3 2 1 0 6 7 public class Homework3 { /** * smoosh() takes an array of ints. On completion the array contains the * same numbers, but wherever the …

Member Avatar for JamesCherrill
0
207
Member Avatar for Prabhat_1

encryption is one of the thing through which we can hide our file folder or anything else now we wanted that to encrypt a folder usin aes algorithm i have compressed the file how to encrypt file or folder

Member Avatar for Hiroshe
0
73
Member Avatar for Affable zaki

I am using upload services and i have to use a request over http due to which IE gives me "Mixed Content" popup. My client do not want this. Is there any way to hide or handle it through java script or in Jquerry or C#? Additional Info: Web Application …

Member Avatar for cgeier
0
157
Member Avatar for moaz.amin.37

Actually I have two questions 1) Why we not create Object with simple mathod like [(class name) (object name;)] in java 2) Why we use Constructor to create object code below class Run{} Run obj=new Run() why not use this code Run obj=new Run; Please relese my confusion

Member Avatar for Slavi
0
311
Member Avatar for cb1991110

I want the program to only allow integers at certain points. The code works but I have to enter a value twice then it skips a part of my code. My code is ` case 1: char ans; do{ Event event = new Event(); out.println("Please Enter the name of event"); …

Member Avatar for Doogledude123
0
224
Member Avatar for Violet_82

Hello, since I have realised how little I have understood of the GridBagLayout, I thought I'd open a thread where I could clarify one by one all my doubts. I have produced a very small and simple GUI which I will use to test the GridBagLayout and ask questions as …

Member Avatar for Violet_82
0
654
Member Avatar for mmm123

Hello, I am new to android development and this is my first time using eclipse so sorry if this question sounds silly. I have created an android application called IFMApp. I have four xml pages and 4 java classes. My application, is cleaning and building fine and will install to …

Member Avatar for peter_budo
0
310
Member Avatar for Netherblood

Hey there guys, I want to make a program that will track the number of times I have clicked a button. Thing is, I want this to write the information down and load it every time, so it doesn't start at 0 every time you start the program. How would …

Member Avatar for JamesCherrill
0
134
Member Avatar for SuperPink

Hello! I'm new to programming and I'm trying to do a basic hotel application using threads in java. Here is what i've already done: //room class public class Room { private int idRoom; private int etaj; private boolean empty; public Room() { this.idRoom = 0; this.etaj = 0; this.empty = …

Member Avatar for lalaRMa
0
2K
Member Avatar for pwolf

I am considering learning some server side stuff with java, however I am getting mixed views and opinions when searching. I read a benchmark that claims java has superior performance than most alternatives, and I was considering taking a look at grizzly or spring, but I really don't know too …

Member Avatar for Taywin
0
352
Member Avatar for Zsolt Szücs

I am a junior Java programmer trying to improve my knowledge in servlets. I have some experience in C++, PHP and SQL but mainly in small projects. It's nice to meet you guys.

Member Avatar for John_66
0
194
Member Avatar for vishalonne

Dear Experts When we create table in MS Access we enter description of field in description column. I am able to get the field name and data type from the table but how can I get the description from the table. Here is the code by which I am getting …

Member Avatar for vishalonne
0
301
Member Avatar for vgkarthi

Hi techies, I am new to webservices. The issue is regarding a SOAP request. The request contains a comment which has the charechter as "&" example., the comment is: You & me & is getting converted to "&amp;" in the receiver side. We tried getting the SOAP request (from our …

Member Avatar for vgkarthi
0
387
Member Avatar for teitsu

Please, i need a thorough tutorials on METHODS AND HOW TO CALL THEM. I also need some elinghtenment on classes in java. I want to really understand this concepts in java.

Member Avatar for stultuske
0
123
Member Avatar for sing1006

for(int i = 0; i < program.size(); i++) if(program.get(i).contains(remp)) with the coding above, i can search and display all string in my arraylist that contains "hit2080". for example HIT2080___Introduction to Programming___ALL___Core___NULL___NULL HIT1307___Internet Technologies___ALL___Core___NULL___HIT2080 but i just want to search and display the first token that contains string "hit2080". Is there …

Member Avatar for sing1006
0
284
Member Avatar for bonzie1923
Member Avatar for JamesCherrill
1
150
Member Avatar for Doogledude123

I know with Lists you can instantiate them to an ArrayList, but is this generally a good idea? Is it better to do 'List<?> list = new ArrayList<?>();' rather then 'ArrayList<?> aList = new ArrayList<?>();'?

Member Avatar for JamesCherrill
0
178
Member Avatar for Doogledude123

I know you can create nested classed (or just classes declared outside of the class in the same file) but what is the point of doing this? Why not just create a new class file?

Member Avatar for JamesCherrill
0
199

The End.