32,204 Topics

Member Avatar for
Member Avatar for bigzos

public class Student{ private String name; public Student(String name) {this.name=name; } public void setName(String sett){ name=sett;} public String getName() {return(name);} } public class Swaptest{ public static void swap(Student p,Student q){ Student temp; temp=p; p=q; q=temp; } public static void main(String a[]) {Student s1=new Student("John"); Student s2=new Student("Mary"); swap(s1,s2); System.out.println("s1="+s1.getName()); System.out.println("s2="+s2.getName()); …

Member Avatar for deceptikon
0
78
Member Avatar for zeusprog
Member Avatar for zeusprog
0
3K
Member Avatar for johncatman

I would like my vb2010 program to click on a javascript element on this webpage depending upon what they choose, here is the source of the rating system, thanks in advance: <div class="basic-info-rating basic-info-user-rating" style="display:none"> <div class="rating quick-rating"> <p class="average rating-3">3 stars</p> <ol class="user" data-analytics='{"click_id":1865,"events":"event6,event7,event24"}' data-ypid="5550608"> <li class="rating-1"> <a data-analytics='{"rating":1}' …

Member Avatar for G_Waddell
0
248
Member Avatar for Deepika Deepi

hi all, Good noon. I am trying to get the match a key word from text, get the input from text and if the match in the text matches with the input. I need to get the result of that. If the word starts in the middle i should not …

0
62
Member Avatar for lse123

trying develop a Russian/English Flag game, given the flag image you choose in Russian or in English modes... Since English country names get from country file image names, can have a Java generic Map key=englishCountryName & value=inRussianEquivalent.... to do the Russian part??? Or exist other way? if you think this …

Member Avatar for lse123
0
188
Member Avatar for AngelOfRock

Hi guys, i'm trying to program a simple Tic-Tac-Toe game with extern Buttons. When i'm compiling the Code there's no mistake, when i press Button1 every thing ok, but on the most other Buttons a mistake is shown up : Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException at grafik.Zeichenfenster.farbeAufloesen(Zeichenfenster.java:330) at grafik.Zeichenfenster.zeichnen(Zeichenfenster.java:276) at …

Member Avatar for JamesCherrill
0
802
Member Avatar for kkcaddy

import java.util.*; public class EmployeeTest { public static void main (String[] args) { Employee[] staff = new Employee[3]; staff[0] = new Employee("Carl Cracker", 75000, 1987, 12, 15); staff[1] = new Employee("Harry Hacker", 50000, 1989, 10, 1); staff[2] = new Employee("Tony Tester", 40000, 1990, 3, 15); for(Employee e : staff) e.raiseSalary(5); …

Member Avatar for NormR1
0
192
Member Avatar for Dark_Omen

Is there a way to convert a double to string. I tried to do it like this x.toString() and it didnt work as well as implicitly converting it.

Member Avatar for JamesCherrill
0
474
Member Avatar for 47pirates

Why the method of the following class is getting invoked several times even if the condition is false.Please help me with my code... public class PRDDayBook { int remX; public PRDDayBook(int x) { remX = x; PrinterJob pj = PrinterJob.getPrinterJob(); PageFormat pf = pj.defaultPage(); Paper paper = new Paper(); double …

Member Avatar for 47pirates
0
100
Member Avatar for annu.mait

how to get refrence of notepad what we havae created using runtime class.,,as i want to write data on that notepad what i m reading from another notepad..can i have an example.?

Member Avatar for NormR1
0
29
Member Avatar for zeusprog

Please how do I convert a string of hexidecimals “10B71356C845FB08E04951AAA2FF9F49” to integer? I tried using getBytes then Integer.valueOf but I got 32 integers instead of 16. Any help would be greatly appreciated. Thank you.

Member Avatar for zeusprog
0
229
Member Avatar for sageetam

hi... I want to write a program which will find out the complexity of a given program or code given as a input through file...... plz help me.....

Member Avatar for JamesCherrill
0
31
Member Avatar for kkcaddy

> Quoted Text Here i got this code from a book i am practicing with and when i try to compile it returns the following error EmployeeTest.java:30: incompactible types found : java.util.Date required: Date hireDay = calendar.getTime(); please how do i debug it import java.util.*; public class EmployeeTest { public …

Member Avatar for vinnitro
0
206
Member Avatar for john.damilare1
Member Avatar for hszforu

I am not able to figure out what's wrong with the following code: Is it a rule to create objects in class that contains main method and then use this object to access the methods? I did exactly reverse in the following code and i am not able to compile …

Member Avatar for hszforu
0
235
Member Avatar for Deepika Deepi

hi all, This is my first post in this site. I have a sentence like this String input = "India/world is my Country and it is in Asia/in world"; I want to remove the word followed by the / and get the result of otheres. Output **India is my Country …

Member Avatar for JamesCherrill
0
215
Member Avatar for LoyalOne2

Hi I have a program that I am to write that is suppose to read from a text file. I am suppose to assume no more than 100 item and terminate after by -1. have to read and store the data. I have to write a method to print the …

Member Avatar for Starstreak
0
147
Member Avatar for rostand.lagarde

Hi There, please guyz, can I please have The code that generates student's code using the first letters of their Names.

Member Avatar for JamesCherrill
0
30
Member Avatar for borchu

Hello everyone, I progress step by step my problem, one step is passed -now I can send string datas -text messages- here another step is I want to record some audio sounds by using microphone in first android emulator assume phone1 and send to second android emulator-phone2-. I found whole …

Member Avatar for borchu
0
9K
Member Avatar for krovi
Member Avatar for jalpesh_007
0
61
Member Avatar for pinsickle

I'm trying to learn Java, pretty easy so far as my previous experiance is with C/C++. I was just curious how to call java classes from different files. That way I don't have to have main as well as all of my classes crammed into one file. I'm sure the …

Member Avatar for dimapoter
0
10K
Member Avatar for zeusprog

Please I am relatively new to Java and would really appreciate your help. Can anyone please tell me what I am doing wrong. I'm trying to send a string to an oracle and save it's output. My program just hangs when I get to this block of code. try { …

Member Avatar for zeusprog
0
155
Member Avatar for LoyalOne2

I have to write a program in java to compute the standard deviation and the mean. I am also to write a test program that will prompt the user to enter 10 numbers and display the mean and standard deviation. I have stared on the program and so far this …

Member Avatar for LoyalOne2
0
2K
Member Avatar for venkateshyeluri

Hi, Im working on a html5 parallax site. I have a problem with the javascript, that it is not detecting the screen resoultion thought I have right css files in my folder. My js detects for one type of screen resolution but it is not detecting the remaining screen types …

Member Avatar for JameB
0
332
Member Avatar for admiralis

Hi this is a PSEUDOCODE. I don't know if is the right place to ask. Can someone takes a look of my pseudocode? I am not sure if I understood the assignment. Thanks! Equinox Nursery maintains records about all the plants it has in stock. The nursery needs a program …

Member Avatar for JamesCherrill
0
194
Member Avatar for royaan.khan

I Want to draw a grid over image that is set or loaded on to a JLabel ,,,,,, when i draw a Grid it push the image forward on JLabel and take place of that image on JLabel ,,,

Member Avatar for JamesCherrill
0
38
Member Avatar for noktasizvirgul

I initialize the selenium like [CODE]public void setUp() throws Exception { setUp("http://localhost/", "*firefox"); } [/CODE] and I write my test in the method like [CODE]public void testUntitled() throws Exception { boo(); foo(); }[/CODE] But it gives error like [CODE]java.lang.RuntimeException: Could not start Selenium session: Failed to start new browser session: …

Member Avatar for Grace Gao
0
866
Member Avatar for admiralis

Hi I am new in this forum. I need some help with this code and is for my intro to programming class. I did it following a pseudocode I found in other website but I am totally confused now. It is not working. Do nothing. Thanks This is the assigment …

Member Avatar for admiralis
0
274
Member Avatar for jalpesh_007

I have one CSV file containing so many attribute but i want max and min values of particular specified columns. I have write following code for finding minimum value from each specified column,but i got only minimum of last column, not all column. In dataset.csv file contains 25,185,98,65 15,-20,6,95 17,20005,63,-78 …

Member Avatar for Taywin
0
3K
Member Avatar for jalpesh_007

Dear all, I have one question arise in my mind while i am making my project. I have one column "AGE" is there.So many values are stored in this column ranging from 0-100. I also have find frequency of each age like age=5 comes how many times in my column …

Member Avatar for Taywin
1
120

The End.