Posts
 
Reputation
Joined
Last Seen
Ranked #3K
Strength to Increase Rep
+0
Strength to Decrease Rep
-0
80% Quality Score
Upvotes Received
11
Posts with Upvotes
7
Upvoting Members
8
Downvotes Received
2
Posts with Downvotes
2
Downvoting Members
2
3 Commented Posts
~11.5K People Reached

23 Posted Topics

Member Avatar for yasaswyg
Member Avatar for asabjork88
0
388
Member Avatar for swagatikat856

Unfortunately I have an "on-line banking" project written in assembly. Do you want me to send you the code ?

Member Avatar for zinahun
-5
191
Member Avatar for jrosh

1) Have you considered doing something like this: [CODE]package snip.swing.frame; import java.awt.Dimension; import java.awt.FlowLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel; public class Example extends JFrame implements ActionListener { /** Static data */ private static final int DIM_X = 300; private static final int DIM_Y …

Member Avatar for saw.pawan
0
621
Member Avatar for burkeyb
Member Avatar for nomemory

Hello, regarding OOP I have Java background, and I usually think in java when I code OOP in python (which sometimes is actually a bad thing). [CODE=python]#!/usr/bin/python class Card(): SUIT = { 'C':'Clubs', 'D':'Diamonds', 'H':'Hearts', 'S':'Spades' } VALUES = { '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, \ '10':10, …

Member Avatar for nomemory
0
418
Member Avatar for Shillz

[CODE]#include <stdio.h> #define PRINT_STRING(_s) printf("%s",_s) int main() { PRINT_STRING("string"); return (0); }[/CODE] You can also try this.

Member Avatar for Shillz
0
160
Member Avatar for davewhite

Check out the spelling. You've written: "Sytem", "Interger", "readLinne()". Afther that, leave Buffers (reading data input from the user is not as simple as it's in C or C++) alone for a while, and try to grasp the Java Basics.

Member Avatar for nomemory
0
112
Member Avatar for hapyharra
Member Avatar for Dazaa

A piece of working code: [CODE]#include <stdio.h> #include <stdlib.h> int mystrlen(char *s); char* reverse(char *s); int main() { char *string; string=(char*)malloc(sizeof(char)*50); printf("Enter string:"); scanf("%s",string); printf("Input string: %s \n",string); string=reverse(string); printf("Output String %s \n",string); return (0); } int mystrlen(char *s) { int i=0; while (s[i] != '\0') { i++; } return …

Member Avatar for Dave Sinkula
0
162
Member Avatar for asmahaque_456
Member Avatar for WaltP
-2
116
Member Avatar for The Mad Hatter
Member Avatar for Evenbit
-5
2K
Member Avatar for low1988

As you can see the JOptionPane method returns a String. You cannot apply switch on String, so you must somehow "convert" that String in char. The charAt() method returns the first char in a String - exactly what you need. In C++ the String is probably already a char* :), …

Member Avatar for low1988
0
726
Member Avatar for adityam4444
Member Avatar for nomemory
-1
90
Member Avatar for KimJack

[CODE] function(pos1, pos2) { /* counter and size */ int i, s; /* first coresponding character */ char c; s = set as array size; c = array[pos1] (as a character) if (c equals the second coresponding character) { for every i smaller than array size (s) { /* Ternary …

Member Avatar for masijade
0
174
Member Avatar for george21

If you choose to implement the ActionListener interface you should also override the actionPerformed(ActionEvent); method. ([URL="http://java.sun.com/j2se/1.5.0/docs/api/java/awt/event/ActionListener.html"]java doc here[/URL]) [CODE]class Chapter165 extends JFrame implements ActionListener { //bla bla bla @Override public void actionPerformed(ActionEvent e) { // TODO Auto-generated method stub } }[/CODE] (I guess you should also include add a button …

Member Avatar for BestJewSinceJC
0
4K
Member Avatar for sbhavan

Don't get me wrong, but Google is a wonderful tool for answering questions like yours: [URL="http://lmgtfy.com/?q=java+ftp+client"]Try this![/URL]

Member Avatar for Member #46692
0
99
Member Avatar for javed123

[QUOTE=javed123;994262]Hi , I have problem related to ArrayList...... ArrayList object may contain 1 or more ArrayList Objects and those inner ArrayList Object may contain 1 or more ArrayList Object and it is extendable to n levels. Condition is also added as ArrayList may contain different type of Objects too, i.e. …

Member Avatar for balumohan2
0
161
Member Avatar for StarZ

It's very simple: ... the class Circle doens't have any [B]main[/B] method. So it's not an actual "program". You should use: [CODE]javac Circle.java TestCircle.java java TestCircle[/CODE] First line will compile both classes. Second line will run the class containing the main method. (don't skip the basics:P)

Member Avatar for StarZ
0
415
Member Avatar for new_2_java

Try to create the process using the ProcessBuilder class: [CODE]ProcessBuilder pb= new ProcessBuilder(command); Process proc= pb.start();[/CODE] "command" is a list of Strings. For Windows it should look like this: [CODE]String[] command= { "cmd", "/C" , "dir" };[/CODE] Additional: After you create the output, you can obtain a stream of data …

Member Avatar for nomemory
0
203
Member Avatar for feartrich

[CODE]public class Factorial { public static int result=1; public static void getFactorial(int n){ if(n>0){ result*=(n--); getFactorial(n); } } public static void main(String args[]){ getFactorial(4); System.out.println(result); } }[/CODE] You can also try this solution if your number is positive.

Member Avatar for nomemory
0
108
Member Avatar for rajuchacha007

What masijade was trying to say is to look at: [URL="http://java.sun.com/javase/6/docs/api/java/io/File.html"]class File[/URL] from the Java API. It's better to do that instead of: [CODE]if (os==windows) classname.runCommand(windows commands) else if (os==linux) classname.runcommand(linux command)[/CODE] If you want to make system dependent "command" calls, look at the [URL="http://java.sun.com/javase/6/docs/api/java/lang/ProcessBuilder.html"]class ProcessBuilder[/URL].

Member Avatar for nomemory
0
157
Member Avatar for leverin4

[QUOTE=leverin4;991676]How would I go about implementing the binary representation of the counter variable?[/QUOTE] If you don't write your own function (better do it!), use the built-in, [U]Integer.toBinaryString(int n)[/U].

Member Avatar for nomemory
0
806
Member Avatar for nomemory

Hello, I am a python newbie and I am trying to accommodate to the basics. What's the python equivalent for the following Java snippet ? [B]Java:[/B] [CODE]public class Main { public static void main(String args[]){ int a,b,c; a= (int) (Math.random()*100); c=0; while((b=(int)(Math.random()*100))!=a){ c+=1; } System.out.println(c); } }[/CODE] I was trying …

Member Avatar for woooee
1
226

The End.