32,199 Topics
| |
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 … | |
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, … | |
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", … | |
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? | |
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.*; … | |
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. | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 < … | |
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 … | |
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 | |
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 … | |
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 | |
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"); … | |
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 … | |
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 … | |
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 … | |
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 = … | |
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 … | |
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. | |
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 … | |
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 "&" in the receiver side. We tried getting the SOAP request (from our … | |
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. | |
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 … | |
how do you display image from a access database into a jtable in java | |
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<?>();'? | |
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? |
The End.