32,199 Topics
| |
>> I googled the dinference between bitwise and logical operators, but i could not understand exactl what it is. Can you simply explain ? | |
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 == … | |
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 … | |
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... | |
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 … | |
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 … | |
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 … | |
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 … | |
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 … | |
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 | |
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 … | |
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 … | |
` 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); } } ` | |
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... | |
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 … | |
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? … | |
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 … | |
/* * @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 … | |
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; … | |
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 | |
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) … | |
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 … | |
hi, how can I find the adress of all connected machines to the network,with InetAdress and thanks for any help | |
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 … | |
When i compile my java programs (.java) they all compile into .class file. when i try to run the class file with this command : " java C:\Users\User\Desktop\JavaProgram" It gives the following error: "Error: could not find or load the main class" how do fix this and how do i … | |
I have ecidentaly set the .class files to open with notepad everytime. How do i set them back to defualt? i have tried to manually browse to find with what it should open but i dont know with what it should open? Thanks... | |
I am developing an java application for for login autentication form, I have pre saved username and password in my database. When admin enter his credetials, it validates to my DB and gives access to actual application Now, my application is used by admin and database is managed by DBA. … | |
i have a program that converts a text string into a hash sequence using parseInt(). but parseInt() keeps throwing a NumberFormatException. any ideas why? is it becuase i'm using <= instead of = in my for loop? EDIT: ingnore r. it's not being used. sorry. package test; import java.util.Random; import … | |
Hi, I need to write a program which can decrease the free disk space. For eg, if the free disk space is 5GB, the application should ask the user how much space do you want occupy. Application should take the input eg, 2GB and decrease the disk space to 3GB. … |
The End.