|
Please try doing a bit of research before posting questions like this. If you have a specific problem then show what you have done and what errors you receive. But don't assume that we can guess what is happening in your program.
|
|
|
|
|
k first i would like to say sorry to u for d't get any research with those questions..afterwards i will post recent questions...
|
|
|
|
|
Keep it to the POI API. That is working, although it is still under construction.
You can find some examples in the Unit Tests of POI-HWPF[^].
|
|
|
|
|
I'm new to java..how to connect java with sql server 2008?then what are all the software we need?
Thanks in Advance,
Thirunavukkarasu Dhanushkodi
|
|
|
|
|
Putting the title of your post into Google would have soon found you the JDBC Trail[^].
|
|
|
|
|
|
|
You could post that question into Google and get lots of useful information.
|
|
|
|
|
import java.awt.*;
import java.applet.Applet;
import javax.swing.*;
import java.awt.event.*;
public class Calendar extends Applet
{
int Year=0;
int a=0;
int b=0, c=0;
int StartOfDay=0;
int Month=0;
int Day=0;
String Holder="";
int DaysInMonth[]={0,31,28,31,30,31,30,31,31,30,31,30,31};
String ArrMonths[]=
{
"\nJanuary",
"\nFebruary",
"\nMarch",
"\nApril",
"\nMay",
"\nJune",
"\nJuly",
"\nAugust",
"\nSeptember",
"\nOctober",
"\nNovember",
"\nDecember"
};
JLabel lblInput= new JLabel("Input year:");
JTextField txtInput= new JTextField("2012",4);
JLabel[] lbl1= new JLabel[12];
JButton btnOk=new JButton("OK");
}
sir .. can you help me ..
There was no error . but when i try to run file .. it failed to initialize . I just want to have a calendar in Java for our finals .. I think its not really difficult .. so i choose this proposal. thanks .. I hop you help me guys
NOTE: Sorry guys it was my first time to do java .. so please don't laugh at me .. LOL
|
|
|
|
|
You have not added any actual code to this to do anything. I suggest you work through this tutorial[^].
|
|
|
|
|
Sir ... I dont really have Idea .. Is it possible to do a calendar in applet ? . just a simple calendar ? ..
|
|
|
|
|
mobi35 wrote: I dont really have Idea Then go and work through the tutorial that I gave you a link for.
|
|
|
|
|
i appreciate ur knowledge pa...
my suggestion is use browser code or (html) code to invoke applet into browser..try it..my dear friend...
|
|
|
|
|
some one please tell me what is the problem
here is the code
public class sortm {
public static void main(String args[])
{
int a[]={5,3,7,2,8};
int b[]={1,9,4,8,10};
int i=1;
int j=1;
int t=0;
int s=0;
for( i=1;i<=5;i++)
{
if(a[i]>a[i+1])
t=a[i];
a[i]=a[i+1];
a[i+1]=t;
}
for( i=1;i<=5;i++){
System.out.println(a[i]);
}
for(j=0;j<=5;j++)
{
if(b[j]>b[j+1])
s=b[j];
b[j]=b[j+1];
b[j+1]=s;
}
for(j=0;j<=5;j++)
{
System.out.println(b[j]);
}
}
}
and this what running say :
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 5
at sortm.main(sortm.java:14)
|
|
|
|
|
in the above code you stored array with five elements so yor index range from 0 to 4
you mention i=1 and maxmium is 5
so for iterations i become 5 at that time it will give arrayoutbound exception
you can just change
for( i=1;i<5;i++)
{
if(a[i]>a[i+1])
t=a[i];
a[i]=a[i+1];
a[i+1]=t;
}
it will execute
|
|
|
|
|
sorry but you solution didnt work,
there is problem in in this statement a[i]>a[i+1] ,when i be 5 ,it is in a[5]>a[6], so compiler search for a[6] and dont found,so here gave me the problem ,and by the way what is a[i]>a[i+1] i didnt get it
thank you
modified 7-Feb-13 14:40pm.
|
|
|
|
|
OmarSH wrote: some one please tell me what is the problem
Your arrays have indexes from 0 to 4. So 0, 1, 2, 3, 4 are the ONLY valid values.
Print out 'i' and print out 'i+1' BEFORE you use it as an array index. If either of those are greater than 4 then it is a bug.
Print out 'j' and print out 'j+1' BEFORE you use it as an array index. If either of those are greater than 4 then it is a bug.
|
|
|
|
|
iknow that but i want to sort array as the code show but compiler when a[i] reach the final one a[4] it compare it with a[5] which it is not exist , i want to it stop compare when it reach the final index is there any code that could help me???
|
|
|
|
|
OmarSH wrote: i want to it stop compare when it reach the final index Then check the value of the index before the compare. Or change your for statement so it counts from 0 to 3, then when i is equal to 3, i+1 will evaluate to 4 and still be a valid index.
|
|
|
|
|
the arrays index no start with zero, and you enter here 5 element in array, so the last elent index no is 4
and you take loop upto 5 index no hense it raised error array index out of bound
int a[]={1,2,3,4,5];
for(inti=0;i<5;i++)
System.out.println(a[i]);
or
for(int i=0;i<=4;i++)
or
for(int i=0;i<a.Length;i++)
|
|
|
|
|
please am writing project about THE DESIGN AND IMPLEMENTATION OF STUDENT INFORMATION SYSTEM. this project must be design with java including the database
|
|
|
|
|
At the risk of repeating myself: no one here is going to write your project for you. Make an effort to do your own work.
|
|
|
|
|
please i need java code on the topic: design and implementation of student information.
|
|
|
|
|
Then please make use of Google to search for it, or sharpen your pencil and start coding.
|
|
|
|
|
Hello all,
I have been trying to generate an x509 certificate and sign it with my private key but I could not. I found some codes online but have problems not working properly. Also, most of them are deprecated.
I appreciate the help and support
|
|
|
|