32,199 Topics
| |
I have this code: [CODE]/* package lab; public class Main { public static void main(String[] args) { int t=0; int h=0; int w=0; String Name="http://hcmiu.edu.vn/mail/cuem"; char[] ch=new char[Name.length()]; for(int i=0;i<Name.length();i++){ ch[i]=Name.charAt(i); for(int j=0;j<Name.length();j++){ if((ch[j]=='/')&&(ch[j+1]=='/')&&(Character.isLetter(ch[j+2]))){ t=j+2; System.out.println(t); h=Name.indexOf('/', j+3); } } } System.out.println(Name.subSequence(t, h)); } } [/CODE] This code run correctly.But … | |
this is my first program using more than one method. while i like it because of its modularity and cleanness, i despise it for its multiple new problems it introduces into my world where i was just getting the hang of the old style. i am supposed to be doing … | |
[B]Here is the problem:[/B]There are (at least) two ways in which you can make a 12 hour clock. One possibility is to just store hour values from 1 to 12. On the other hand, you can just leave the clock to work internally as a 24 hour clock, but change … | |
the final test given to me by our professor is that display a JTable with 5 names in it no nid to input | |
Hello all. I have a small problem, i need to recieve a 8 digit number for example: 12345678 87654321 and so on. After i need to devide the value and use the int as a array, something like int i=123; System.out.println(i[1]); It should return 2 (therocially), but obviously the doesnt … | |
write a program which asks the user how many days they will be working. then using your program calculate and print the amount of money they will earn if paid £1 for day 1, £3 for day 2, £9 for day 3 etc.....i have coded the inputing of name and … | |
[code] import com.sun.crypto.provider.RSACipher; import java.util.Random; public class RandomRange { static int START = 1; static int END; static Random random = new Random(); private static void showRandomInteger(int aStart, int aEnd, Random aRandom){ if ( aStart > aEnd ) { throw new IllegalArgumentException("Start cannot exceed End."); } //get the range, casting … | |
Hi, ive been trying to assign a value to a variable from within the ActionPerformed method, but the value seems to be lost as soon as ActionPerformed method ends. here's the code [CODE] public class Log{ private JTextField user = new JTextField(10); private JPasswordField pass = new JPasswordField(10); private int … | |
[B]Here is the problem[/B]:Change the clock from a 24 hour clock to a 12 hour clock. Be careful: this is not as easy as it might at first seem. In a 12 hour clock the hours after midnight and after noon are not shown as 00:30, but as 12:30. Thus … | |
Hello all, I am writing a java application where I have a Jtable with checkboxes next to the data. If the user checks a box, I want to store a specific value from the data table. I can do this inelegantly by setting setCellSelectionEnabled(true) and adding the following to the … | |
Hello. I'm trying to write a program that registers Mouse Clicks that occur on the System, not just in a JFrame. Does java6's desktop integration allow this sort of thing? or would I have to use JNI to listen for Mouse clicks and Key Pressed? | |
The code will be able to detect the face from webcame then determine weather it's in any situation relay under sad,happy ,...etc then play music file according to the situation.[code]Hello every body,I'm doing Project on Face detection situation,weather if it indicate happy ,sad....etc situation.So the problem is there is many … | |
hi all, i am in an urgent requirement of getting the WAN ip of the visitors of my website through java. using getRemoteHost() gives me the lan ip. please respond | |
if and if-else statement: you will have to write a program that reads a 4-digit positive integer from the user and prints out the following information on the screen: 1. Whether the positive integer is an odd or even number 2. (display) The odd digits of the integer 3. (display) … | |
Hi, I have to develop a software and it should run on windows, mac and linux, so i was thinking of developing it in java using netbeans :-/ I have windows OS, would the jar file generated in windows run properly on mac and linux? and is there any specific … | |
Hey there everyone, first post here so please excuse any mistakes :) Ok so I have this assignment here: Suppose the weekly hours for all employees are stored in a two dimensional array. Each row records an employee's seven-day works hours with seven columns. For example, the following array stores … | |
Hi all, I have a C program namely NetLibExample.c.I have compiled it to get a NetLibexample executable in RHEL5. It is successfully running from the terminal itself by the syntax: ./NetLibExample I have written a shell script to call the same.The shell script is test.sh **test.sh** cd /working/AVClient mkdir habib_test … | |
I want to write this. [b]Last[/b] night i dreamt of [b]San Pedro[/b]. How can I write this with 1 PdfPCell | |
hi friend i wish to store mp3 files in postgresql database i want to store this for my project i am using java as front end and mp3 files as backend | |
I have used org.apache.commons.httpclient.HttpClient for the first one and org.apache.http.impl.client.DefaultHttpClient for the second. for both codes i'm getting response codes 200 ok. it is happening even when i remove username n pwd fields. So i'm not logging in...[code]1) HttpClient client = new HttpClient(); GetMethod get = new GetMethod("https://control.akamai.com"); System.out.println(client.executeMethod(get)); System.out.println("now … | |
hi. i want to call a new frame on clicking on treeview . pls help. thanks | |
I am having some problems with (a)coloring my stick figer(b)to stabelise the line on which the stick fig is supposed to be running across the Applet on. Can some one please advise me on how to achive this? Thanking you in advance. [CODE] //Walking //Written By: //Written on: import java.applet.*; … | |
Hello I have a csv file and i want to read data from it and pass the data to the database. Now. I have values that are seperated with semicolons. The file is like this. customerID;name;surname;phoneNumber 1;Gokhan;Terzioglu;333444333 2;Melih;Terzioglu;555444333 There are 100.000 columns like this. How can I read the data … | |
Hi, This is my perl program.......... [CODE]#!c:/perl/bin/perl use CGI qw(:all); $pfaccode=param('faccode'); $pprogramme=param('programme'); $pdeptcode=param('deptcode'); $pbrancode=param('brancode'); $psemester=param('semester'); $pkook = cookie(-name=>'logtime'); print "Content-type: text/html\n\n"; print "<body bgcolor=\"#ffcccc\">"; use DBI; my $dbh = DBI->connect("DBI:ODBC:wwwdsn","webid","dibew") or die "Cant connect: $DBI::errstr\n"; my $sth = $dbh->prepare("select kid from facltmst where faccode = ?") or die "Can not … | |
HI Friends i am preparing for scjp 6 and i have started studying kathy sierra plz tell me that what more should i study and how should i study to crack scjp 6 plz reply with ur suggestion and experience... | |
why the do-while couldnt return the main body when i did once.when I input n<2 and press enter, it stops and turns to error. i dont know why?could i any one told me why and how to change it and is there another code to do this loop( instead do-while).thanks … | |
[code] import java.util.*; public class course { static Scanner sc=new Scanner(System.in); public static void main(String[]args) { String name,students,addStudent; int numberOfStudents; String courseName,getName,getStudents; int getnumberOfStudents; Course course1=new Course("C++"); Course course2=new Course("Java"); course1.addStudent("Peter"); course1.addStudent("Brian"); course1.addStudent("Anne"); course2.addStudent("Peter"); course1.addStudent("Steve"); System.out.println("Num of student in course1:"+course1.getnumberOfStudents()); String[]students=course1.getStudents(); for (int i = 0; i < course1.getNumberOfStudents(); i++) … | |
HI ! GUYS WILL YOU PLEASE HELP ME IN SOLVIG A SIMPLE QUESTION RELATING TO JAVA RMI MY QUESTION IS HOW TO START RMI REGISTRY PROGRAMATICALY with out TYPING IN CMD(command prompt ) start rmiregistry ? | |
i dont know where to put my getValidString validation when i ask the user if he wants to judge another public class JudgingApp { public static void main(String args[]) { Scanner sc= new Scanner(System.in); DecimalFormat df = new DecimalFormat("0.##");//format decimals to 2 decimal places //These variables hold the max and … | |
When the program calls the getValidString it won't display "Judge Another? (y/n)" It seems like everything should work I just can't figure it out //see if the user would like to continue choice = getValidString(sc,"Judge Another? (y/n): ", "y" , "n" ); private static String getValidString(Scanner sc, String prompt, String … |
The End.