32,204 Topics

Member Avatar for
Member Avatar for salahuddin_1
Member Avatar for JamesCherrill
0
46
Member Avatar for UK-1991

Hello guyz Just written a small code trying to make a scenario in which I get a name from user and see that the provided name is present in my array list if it is then it displays name found if not present in array it simply says name not …

Member Avatar for JamesCherrill
0
106
Member Avatar for shungkiu.lee

hello guys, well basically i have zero java knowledge, so don't mind me asking such kind of dumbass question( to you but not to me lol) so, i have a .txt file in which there is a number in such line (for example, 0 and 1) i want to print …

Member Avatar for JamesCherrill
0
183
Member Avatar for divinity02

hi all how do you build a java game called a multiple maths game. can anyone give me any advice, now I say advice to at least guide me in the right direction. I have to build a multiple maths game in java with levels, easy meduim and difficult. how …

Member Avatar for JamesCherrill
0
294
Member Avatar for rhydham1

import java.util.Scanner; public class ConvertDate `{` Scanner console = new Scanner(System.in); public static void main(String[] args) { // Inputs the month, day, and year ConvertDate.prompt("Enter date to be converted: "); String date = ConvertDate.readLine(); // Trims the extra spaces String dte = date.trim(); // Creates the minimum space between the …

Member Avatar for stultuske
0
90
Member Avatar for nataraja833

package my_package; my_object obj_instance; String my_string; my_string = obj_instance.toString(); System.out.println(my_string) ; // gives my_package.my_object@asj128 // I've lost track of obj_instance but it in memory // and I want to recover it from my_string , like my_object obj_instance1 obj_instance1 = ( my_object) my_string ; some thing like string to object converstion …

Member Avatar for nataraja833
0
226
Member Avatar for ardi_lucy

help me plz i need to sort ip address, am try to sort in java.util.Arrays.sort() but it not correct for eg [CODE] String st[]={"10.4.23.16","10.4.23.9"}; java.util.Arrays.sort(st); for(int i=0;i<st.length;i++){ System.out.println(st[i]); } [/CODE] the out put is 10.4.23.16 10.4.23.9 plz give idea

Member Avatar for anita_2
0
1K
Member Avatar for kinbo

Hi First of all let me tell you that my programming skill aren't great and I'm still learning java. Basically I'm trying to write a program that allow the user to enter a quantity in textfield1. Then when the confirm button is pressed, it'll display the result in textfield2 int …

Member Avatar for bmwwbb54
0
221
Member Avatar for divinity02

I have write a program to read 6 numbers and find the average of all odd numbers. here is my code Scanner get = new Scanner (System.in); double average = 0, counter = 0 ; int i, num = 0, sum = 0, count = 0, total = 0; for(i=0; …

Member Avatar for Taywin
0
178
Member Avatar for chubbyy.putto

I am very confuse about find the if the file is in english word. Let say that file contain some garbage letter and number but in that garbage letter and number it have a mean. Let say hello there in that file how do I set the code so that …

Member Avatar for Taywin
0
116
Member Avatar for JamesCherrill

Although layout managers usually scale text properly, with the spread of "retina" Macs with screen resolutions over 200 d.p.i. we can't just keep ignoring pixel size for grahics or animation. Toolbox has a method for getting the screen resolution, but I don't have access to enough varied machines to see …

Member Avatar for Slavi
0
193
Member Avatar for Stefce

I want to make new string to show under the first ("Verificiranje na akauntot !") text but i dont know what to do in the "jLabel3MouseClicked" class, please help me how do i paint the graphic after i press the label ? here is some code: @Override public void paint(final …

Member Avatar for JamesCherrill
0
319
Member Avatar for marvin.lerias

package Assignment2; import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.util.*; public class AuctionDialog extends JFrame implements ActionListener { private JLabel lblOutput; private JTextField tfBidder; private JTextField tfPainting; private JTextField tfAmount; private JTextArea taOutput; private JButton btnSubmit; private Painting paintings; private Bid bids; private Auction artworkAuction; public AuctionDialog( ) { artworkAuction …

Member Avatar for marvin.lerias
0
281
Member Avatar for Nikki_77

Write a class named Car that has the following fields: yearModel. The yearModel field is an int that holds the car's year model make. The make field references a String object that holds the make of the car speed. The speed field is an int that holds the car's current …

Member Avatar for stultuske
0
22K
Member Avatar for Mr.M

Hi Dw. I want to write the program for VeriFone device that will read the cards, this device has 2 types of readers the one reads the chip and the other is for magnetic strip reader so I want to write a program that will listen for both readers and …

Member Avatar for Mr.M
0
1K
Member Avatar for srikanth2321

Hi,, I have a json file and I would like to convert it into java class. The main aim is to create a dynamic interface from the JSON file. I found metawidget library which can generate interface from a java class. I would like to know or possibly a sample …

Member Avatar for Richard_21
0
257
Member Avatar for Decode098

package mobile; import java.util.*; /** * * @author user */ public class Mobile { /** * @param args the command line arguments */ public static void main(String[] args) { int[][] data = new int[10][10]; data = timesTable(10,10); Scanner scan = new Scanner(System.in); System.out.print("Enter Row:"); int row2 = scan.nextInt(); System.out.println(""); System.out.print("Enter …

Member Avatar for stultuske
0
247
Member Avatar for haze man

Hi guys, I am pretty new here and with android development. I have created my first app and am looking to expand on it and add some more style to it. What I am trying to do is add a navigation drawer to the app. So instead of the buttons …

Member Avatar for peter_budo
0
358
Member Avatar for sel15

I'm having trouble making an eclipse plugin. This is what I have done so far, this create a menu item in project explorer (when right clicked) but it is disabled and I don't know why, maybe because the button doesn't do anything right now: <plugin> <extension point="org.eclipse.ui.menus"> <menuContribution locationURI="popup:org.eclipse.ui.navigator.ProjectExplorer#PopupMenu?after=additions"> <command …

Member Avatar for stultuske
0
132
Member Avatar for nitin1

/* package whatever; // don't place package name! */ import java.util.*; import java.lang.*; import java.io.*; class Test{ public static void main(String args[]){ String Str = new String("WelcometoTutorialspoint.com-"); int i=0; System.out.println("Return Value :" ); for (String retval: Str.split("-", 2)){ System.out.println(retval); System.out.println(i); i++; } i=0; System.out.println(""); System.out.println("Return Value :" ); for (String …

Member Avatar for nitin1
0
166
Member Avatar for nikk8a

Hello, I have a string which consists of tokens enclosed in square brackets []. I need to identify these and process the string to replace them with some other derived values. I am unable to get list of tokens via Pattern matching. Below is my code snippet. String str = …

Member Avatar for nikk8a
0
241
Member Avatar for Slavi

Well basically, I was coding earlier and I encountered this for(int i = 0; i<acl.size();i++){ //System.out.println(acl.get(i)); if(acl.get(i).contains(role)){ permissions = acl.get(i).split(":"); if(permissions[operation].equals("yes")) return true; } } and I was getting index out of boundary exception, but I knew that wasn't the case so I decided to use a for loop to …

Member Avatar for Slavi
0
135
Member Avatar for diya45

hi everyone i have 1 question regarding array in c# application how i arrange numbers in ascending or descending order in array using c# software i do this int array=new int[1,2,3,4,5] furhter i cant processed plz can anyone tell me about this thankx..

Member Avatar for cronynaval
0
4K
Member Avatar for bob.smithy.10

hey,I have been working on a program, or at least trying to get started, but i am having some difficulty. On step 5 i am unsure on weather i would need to use a for loop of a if statement. and how would i do this. Step 6 : is …

Member Avatar for bob.smithy.10
0
218
Member Avatar for Varunkrishna

Hi all Please find the telegram android application's source code https://github.com/DrKLO/Telegram/ This is a working android application, and I want to use this application as a messenger in my web application, so with this same set of code can I be able to create a web application. Thanks Varun Krishna. …

Member Avatar for Varunkrishna
0
353
Member Avatar for fireballthor

I am needing to write a program for someone that needs it to count by any number they manually enter into the program. I have the menu code written and now just need help with the counnting code. I know i most likely need to use a "for" loop but …

Member Avatar for Slavi
0
336
Member Avatar for Dinesh_9

Hi everyone,I am assigned with an task of writing an java code to create an Word-Frequency-Counter which needs to satisfy the following constraints: 1)It must prompt the user to enter an path from where the code will read all the contents of text files(.txt) present in that directory. 2)An property …

Member Avatar for vighnesh.anap
0
6K
Member Avatar for nipur23

Hi guys, I'm almost finished my assignment. It's purpose is to translate english words to pirate language. For example, when some enters "hello", "ahoy" is returned. But when I enter two words like "pardon me", "null" is returned even though I have assigned "avast" to it. I'm thinking this is …

Member Avatar for stultuske
0
1K
Member Avatar for redtribal23

I'm trying to make a program that reads in numbers and commands and prints the list of numbers. I am trying to solve one problem at a time and this is about exception handling. I am still not familiar with the whole exception handling that is why I get confused. …

Member Avatar for Taywin
0
214
Member Avatar for nitin1

Does C++ consider \/ as an escape character? And does Java consider it? I am talking about forward and backslashes. Please tell. How does Java and C++ considers them differently? I mean : in C++: this '/' works fine without escape. in Java: this '\/' will result in '/'. Is …

Member Avatar for nitin1
0
236

The End.