32,199 Topics
| |
Hello! [CODE]public static void main(String[] args) { System.out.println("Type the operation system (Windows or Linux):"); Scanner oku= new Scanner(System.in); String os=oku.next(); if(os=="Windows") { CreateForWindows(); } if(os=="Linux") { CreateForLinux(); } else { System.out.println("Wrong selection. Program closed."); return; } return;[/CODE] It always show me Wrong selection. Program closed. I can not understand why … | |
javascript:document.body.contentEditable='true'; document.designMode='on'; void 0 the codescrap entered in the address bar makes any web page locally editable, you can play with any element or content | |
Hi I need help its actually working fine but i don't know how to put a control structure in knowing whether the input is wrong, example when i instruct user to input number it must be less than 100 if not error will show up that is only the last … | |
am a student developing a programe for a lib but am failing to create new JFrames when buttons are clicked i need help handing in with 3 days | |
i am not saying that all of my jar files are not working. in fact, all of them do work so far except for this one game that i've made. it runs perfectly in my editor, but its jar file will not execute. i checked its MANIFEST.mf file and the … | |
Is it possible to have a python program communicate to a java program over the internet? Like could i send text over sockets from a python program and have a java program receive it. | |
Hi there, I am supposed to make a Java programme called prize collection My programme is a follow: [code]import javax.swing.JOptionPane; import java.util.*; import java.lang.*; public class PrizeCollection { public static void main (String[]args) { // Declare variables and arrays which will be used in the programme String[] Name = new … | |
I am a beginner to Android programming. I am trying to convert an string(from an EditText widget) to a double Whenever i run the program, it crashes whenever the parseDouble function is used: [CODE]Double.parseDouble( input.getText().toString() ); [/CODE] Does anybody have an idea why parseDouble causes my program to crash and … | |
Hi everyone I am a beginner in java,and i need your help.If i have a array like this : [CODE]int [] eda={2,5,8,9}[/CODE]how to use the get and set methods for consult and change the data of this array..?? Please help me with a simple example if anyone can.Thank u I … | |
G'day everyone, I just have a few questions about Java programming language. Before getting started with the question, I was actually doing some reading for my java course and there was an implementation of Coffee vending machine in java. Therefore, the questions came to my mind and these are: Do … | |
I need assistance in printing out a Quine. I googled it and stuff, but I didn't understand the code snippets I saw. Can anyone explain in a more lucid tone? | |
HI everyone,i am a biginer in java and i need your help...i have write a prgram but i cant execute can anyone help me for execute it the program is : package sensor; [CODE]public class sensor { private String Id; private int Kordx; private int Kordy; private char[] getId; public … | |
HI everyone!I am a beginner in java and i need your help,please if u can help me i have write this code : [CODE]package person; public class person { private String Name; private String Birthday; public person (String name,String birthday) { super (); Name=name; Birthday=birthday; } public String getName() { … | |
Hello! I have write a program on Java. This Java program creates a file which have C code for Windows. I need to compile everytime this C code by copying it to another IDE. Can i do this compile process from java program? (C code is very simple and it … | |
Hello there. Could you give some insightful input into my problem: My program is fed multiple lines of input. The input is composed of a name and two values of that person. Each line is of a new 'person' e.g. "James 23 15.05 Lucy 51 25.523 Kam 42.4 21.54 Jak … | |
I'm trying to learn java. Now I want to test the buttons, but I don't understand the part of the layout. Can't I just write button1.setLocation(50,50); or someting like that ??? Thanks in advance. | |
Hi there, I am not good with Java. Can someone explain this for loop for me please. For a for loop, to my understanding the syntax goes something like, [CODE]for(int i = 0; i < someNumber; i++) { //...some code... }[/CODE] but in this one I have seen, the for … | |
HI! Can someone help me regarding my USB and a Java program. So I have created a Jar file where there is a login form. I have my USB that is partitioned in two. What I want to happen is before I open one of the partitions, my Login form … | |
Hi all, Wonder if someone could please lend a hand, I have a courses.txt file which is read into a Course String array I also have a program.txt (A list of 8 courses required to pass the program) There's a menu option to change the Program, however a condition of … | |
Hi I'm new to GWT and I am learning using the GWT plugin for eclispe and also have smartGWT. I have found afew tutorials online which have been very helpful but havent found one that explains how I can connect, send, recieve and display database information in the different widgets. … | |
Good Day! My professor in object oriented programming wants us to collect a JFrame form to a class.... he told us the code but it did not work...Hope you may help me...and thanks in advance [code]import javax.swing.JOptionPane; public class Firm { //---------------------------------------------------------- // Creates a staff of employees for a … | |
Is there any method in java to know size of decimal?? I mean 14 has 2 digits , 100 has 3 etc....... I m going to implement auto generated number like A0001 , now i want to change it on each new entry , so Does any one has any … | |
Hi All, I am trying to load from a .dat file a collection of student objects However on load it only loads the first student and then stops I've tried to put print messages in but with all the nulls I really can't seem to work out what is happening. … | |
Having some issues figuring out how to code my add, modify, search, delete, and save buttons in my program. The buttons need to also adjust the size of the array once I add or delete the an item. Any help would be great. I may be going about this the … | |
Hi everyone!i am beginner in java,i have write a program but i can compile it successfully can any one help me please...te code is [CODE]package sensor; public class sensor { private String Id; private int Kordx; private int Kordy; private char[] getId; public static void main(String[] args) { sensor ob=new … | |
In my program i want to execute same statement on case 3 and 5 in switch() i searched lot on google about this but get nothing please help me [CODE] case 3,5: [/CODE] I know it is wrong but if you have any idea about this than please help me. | |
guys what is the difference between JButton and JToggleButton? | |
I have the following XPath expression written in Java: [CODE] " pProbs = XPath.newInstance(/n-grams-sorted/n-gram[contains(.,"+content1+") or contains(.,"+content2+") or contains(.,"+content3+") or contains(.,"+content4+") or contains(.,"+content5+")]/@probability"); [/CODE] My problem is that not all of the contains() expressions return true. What I need is: If one of them returns 'false' (i.e.: there are no nodes … | |
I'm writing a java program that adds event handlers dynamically on the go on instructions by the user. My problem is, that how do I basically add them? | |
I just wanted to know what would happen if you abuse the CharStack class by pop()ing more characters than you push()? Would it be an error of out of exception or something else. |
The End.