32,204 Topics

Member Avatar for
Member Avatar for yuyuttiu

Hi, I'm new to this site, and I thought this place might help me with some of the problems I am hitting. I am currently in grade 12 Computer Science, and I am coding a third-dimensional snake game (isometric view, so can all be drawn in 2D) I have taken …

Member Avatar for yuyuttiu
0
649
Member Avatar for TIM_M_91

Ok so when I run the following code nothing occurs so could someone look at the code and tell me where I have gone wrong? public class somee { public static void main(String[] args) { somee f = new somee(); } public void f() { int anInt = g(7); System.out.println("ffff"+anInt); …

Member Avatar for JamesCherrill
0
183
Member Avatar for vinnitro

This is my program import java.util.*; class Triangle { public static void main(String Vinod[]) { int i,j,n; Scanner sc=new Scanner(System.in); System.out.print("Enter a height of triangle : "); n=sc.nextInt(); for(i=1;i<=n;i++) { for(j=1;j<=i;j++) { System.out.print("*"); } System.out.println(); } for(j=n;j<=1;j--) { for(i=j;i<=1;i--) { System.out.print("*"); } System.out.println(); } } } I dont know what …

Member Avatar for vinnitro
0
156
Member Avatar for ishlux

Hi all, i have installed jdk1.7 , now i want to set the class path.. because i am compiling my program its giving an error.....javac is not recognized as an internal or external commond. please help me to set the class path.......and how to able to run my program.

Member Avatar for ramguru
0
94
Member Avatar for soledad82
Member Avatar for ramguru
0
139
Member Avatar for GeekTool

>> I googled the dinference between bitwise and logical operators, but i could not understand exactl what it is. Can you simply explain ?

Member Avatar for NormR1
0
559
Member Avatar for CPT

Heloo,this wil be my first post here, the reason for that is I can't figure this one out by myself public class Client extends Thread{ Socket socket = null; ServerResponse sr = null; private class serverResponse extends Thread{ InputStream in = null; public serverResponse(Socket socket) throws IOException{ if (socket == …

Member Avatar for NormR1
0
476
Member Avatar for GeekTool

import java.util.Scanner; public class SwitchStatement { private String courseName; private int total; private int gradeCounter; private int aCount; private int bCount; private int cCount; private int dCount; private int fCount; public SwitchStatement(String name){ courseName = name; } public String getCourseName(){ return courseName; } public void displayMessage(){ System.out.println("Welcome to the grade …

Member Avatar for wen_cai
0
231
Member Avatar for GeekTool

can anybody explain with details how to calculate the factor of a number ? i m trying to do this with while statement. how can i do this ? please...

Member Avatar for TrustyTony
0
137
Member Avatar for ocw91

I was trying to reduce my jtextfield height, since it is for user to enter first name. somehow when i run the code, the box is just too big, is there anyway to change the textfield height? i tried with setPrefferedSize but somehow it showing error, mayb i put it …

Member Avatar for Majestics
0
2K
Member Avatar for GeekTool

package newsatranc; import java.awt.BorderLayout; import java.awt.Color; import java.awt.ComponentOrientation; import java.awt.Cursor; import java.awt.GridLayout; import java.awt.event.InputEvent; import java.awt.image.BufferedImage; import java.io.IOException; import java.io.InputStream; import java.util.Map; import java.util.TreeMap; import javax.imageio.ImageIO; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JOptionPane; import javax.swing.JPanel; import javax.swing.JToolBar; import java.awt.Dimension; public class NewSatranc extends JFrame { private static …

Member Avatar for NormR1
0
258
Member Avatar for jefferson33333

hi there guys i have no experience doing jave code so i am wondering if you can help with something i have been told to do a register code (the class register) for a game with windows pop in and out during the fill in blanks like name, surname, id …

Member Avatar for jefferson33333
0
388
Member Avatar for AP07KJT

Hi, I've written the below code as part of a University assignment, it compiled ok in Eclipse but returns the `<identifier> expected` error when compiling via the command line. The error appears on lines 7, 8, 12, 13 and 20. Could anyone shed any light on why i'm getting it …

Member Avatar for JamesCherrill
0
3K
Member Avatar for c.pentasuglia

Suppose i have a class that implements an interface, the interface is not implementing anything currently. This class and interface are bundled together in the same java program. So i have another program, and through a dependency i want to get that information from that class i spoke of in …

Member Avatar for NormR1
0
207
Member Avatar for zina_a

hi, I prepare for a project for LAN monitoring,and I want to display hosts connected to the network with a jTree( the name or the adress of the machine),I do not know where I can start,is there any open source software that allows making something similar and thanks for help

Member Avatar for Majestics
0
78
Member Avatar for jwings

I have problems with adding images to JFrame java application. Now I am using Eclipse IDE. Below is the code that no images is shown. import java.awt.BorderLayout; import javax.swing.ImageIcon; import javax.swing.JLabel; import javax.swing.JFrame; public class LabelDemo { public static void main(String[] args) { JLabel northLabel = new JLabel("North"); ImageIcon labelIcon …

Member Avatar for NormR1
0
254
Member Avatar for shaneo123

hi i am new to developing apps i have created a simple hello world app now i am just trying to create another simple app as follows: i would like a background preferably a picture, also i want a hyperlink so when clicked it takes the user to that website …

Member Avatar for BryanChris
0
145
Member Avatar for reeturajc

` import java.io.*; class Mobile { public static void main(String args[])throws IOException { BufferedReader in=new BufferedReader(new InputStreamReader(System.in)); double a;b=0; System.out.println("Enter ICCID or Sim No."); a=double.parsedouble(in.readLine()); if(a=89912507111140687941) b=7277526804; else if(a=89915241100005705108) b=8084698160; else if(a=89912507111140687958) b=7277526805; else if(a=89912502113154600856) b=9852994726; else if(a=89912502113154600989) b=9852999686; else b=121 system.out.println("Your Mobile Number "+b); } } `

Member Avatar for stultuske
0
571
Member Avatar for belber

Hy all, I wan't to ask, how to update jdk in netbeans..?? i have netbeans 7.0.1 and jdk 1.6 in the netbeans but i want to update it to jdk 1.7 help me...

Member Avatar for belber
0
121
Member Avatar for shifat96

The title might sound confusing, so here is what I want to do: I am currently working on a school project, and I have to make a rock, paper, scissors game. I am almost done and only need one more thing. I have two methods (bigWinner and finalResult) In method …

Member Avatar for corby
0
5K
Member Avatar for crazymidget01

I am working on condensing my code for a project. Is there a way to print multiple primative types of arrays with the same method? I know you can with using "Object" but these are primative. Should I change them to Integer, Double, Boolean, etc and do it that way? …

Member Avatar for wen_cai
0
172
Member Avatar for javaa

Hello ,,, am having trouble while making a drag and drop label i wrote a code i'v seen on youtube , but after compiling i had punsh of Exception and i don't know why !! can any one help me writing a drag and drop code , i'll post the …

Member Avatar for javaa
0
267
Member Avatar for NestaMarley

/* * @author JDickerson * Created on 4 Aug 2008 */ package com.jjpeople.addressbook.gui; import com.jjpeople.addressbook.lineformatter.LineFormatter; import com.jjpeople.serviceworker.gui.GuiException; /** * This application uses a Service to Worker pattern which is located in the * package: com.jjpeople.serviceworker * <p> * This interface models the Gui. * * @author JDickerson * Created on …

Member Avatar for NormR1
0
382
Member Avatar for andy_m

We have a programming assignment for my Java Programming class and I can't figure out to fix my output. Here's the code: class Box { double width; double height; double depth; double w2, h2, d2; double v2; Box() { } Box(double w, double h, double d) { width = w; …

Member Avatar for andy_m
0
134
Member Avatar for arinaitweusama
Member Avatar for ruzt

how to create a java program that ask the user to input a string and to input a number of how many times you want to reverse it at right to left? please help me with creating this program.. sample: Enter word: computer enter number of rotation: 3 output: tercompu

Member Avatar for nitinmbhanu
0
952
Member Avatar for Jiten@energos

2012-03-23 10:42:08 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exceptio java.lang.NullPointerException at org.apache.jsp.jsp.TitleFrame_jsp._jspService(TitleFrame_jsp.java:66) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:311) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:284) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:204) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:257) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:245) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:199) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:567) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:184) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:151) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:164) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:149) …

0
71
Member Avatar for spydahmeen

Design a Java Application project for maintaining Employee Information in a company. Follow the instructions below for further details. (i) Create a class named EmpDetails. (ii) Declare variables emp_name as String (To hold employee name), emp_id as Integer (To hold employee id), emp_desig as String (To hold designation of the …

Member Avatar for NormR1
0
107
Member Avatar for zina_a

hi, how can I find the adress of all connected machines to the network,with InetAdress and thanks for any help

Member Avatar for JamesCherrill
0
72
Member Avatar for asif49

I'm trying to learn how to implement a LinkedList by hand and I notice that when the LinkedList needs to be traversed with a for loop that instead of the usual for loop structure used for traversing arrays.... for (int i = 0; i<length; i++) what is used instead in …

Member Avatar for asif49
0
106

The End.