Win a copy of Securing DevOps this week in the Security forum!

chandan kuchipudi

Greenhorn
+ Follow
since Jun 27, 2012
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
1
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by chandan kuchipudi

unable to connect to database using this code ....
2 years ago
Thank you for your concerns ....i'll try to read my class notes once before proceeding to coding ...and working with Scanner class is not a good idea for a beginner i think .. ...1.var.initalization ,2.cmd line arguments ...then only scanner class to read inputs from keyboard.. ...
5 years ago
[Added code tags and formatted - please see UseCodeTags]


it is saying that :


Function.java:4: error: <identifier> expected
System.out.println("please enter two numbers ");
^
Function.java:4: error: illegal start of type
System.out.println("please enter two numbers ");
^
2 errors




please check the code and help me ...thank you ..
5 years ago
thank you for help ....after writing the main method in Thread1 class , still it is showing an error like this ..

error line no:12 'catch' without 'try'

line no 6: try without catch ...


and Bear Bibeault......i've changed the name ....thank you for your concern...
5 years ago
hi all.....i've got a problem while executing this thread based program.....actually my intension is to print 1 to 10 numbers with the gap of 1 second.....please look into that and help me ....


///thread demo.java
class Thread1 extends Thread
{
public void run()
{
try
{
for (int i=1; i<=10;i++ )
{
System.out.println("your time starts now="+i);
Thread.sleep(1000);
}catch (InterruptedException ie)
{
System.out.println("error in thread execution");
}
}//run ()
}//thread1
class ThreadDemo
{
public static void main(String[]args)
{
Thread1 t=new Thread1();
t.start();
}
}//ThreadDemo


when i execute this prog , it is showing that error : line no.17

illegal static declaration in inner class Thread1.ThreadDemo

public static void main (String[]args)

modifier 'static ' is only allowed in constant variable declaration




please help ...
5 years ago
thankyou ...i've changed the constructor ...

but it is showing the error after this


line no 67: error: illegal static declaration in inner class Check CheckDemo1.java

public static void main (String []args)

modifier 'static' is only allowed in constant variable declarations
5 years ago
hi all .....i've got a problem whlie executing this frame based application ....please resolve it ...

//CheckDemo.java

import java.awt.*;
import java.awt.event.*;

class CheckBox extends Frame
{
Checkbox cb1,cb2,cb3;
Label l1;

Check()

{
setTitle("CHECKBOX DEMO");
setSize(300,300);
FlowLayout fl=new FlowLayout();
setLayout(fl);
// create the components
cb1=new Checkbox("java");
cb2=new Checkbox(".NET");
cb3=new Checkbox("CLOUD COMPUTING");
l1=new Label("YOUR SELECTED COURSE");


//ADD COMPONENTS TO CONTAINER

add(cb1);add(cb2);add(cb3);add(l1);

//registration process

Sathya so=new Sathya();
cb1.addItemListener(so);
cb2.addItemListener(so);
cb3.addItemListener(so);

setVisible (true);
}//check()

class Sathya implements ItemListener
{
public void itemStateChanged(ItemEvent ie)
{
if (ie.getSource()==cb1)

{
if(cb1.getState())
{
l1.setText("your selected course:"+cb1.getLabel());
}
if(cb2.getState())
{
l1.setText("your selected course:"+cb2.getLabel());
}
if(cb3.getState())
{
l1.setText("your selected course:"+cb3.getLabel());
}
else
{
l1.setText("your selected course=none");
}//else
}//isc

}//sathya
}//check
class CheckDemo1
{
public static void main (String [] args)
{
Check co= new Check();
}
}
}


it is showing that

java 11:error invalid method declaration; return type required Check()


please look into that once.


5 years ago
thankyou ....i got the output finally .....
5 years ago


thank you matthew .....i've changed "i" .....but still it is showing error like this

line no 53 error : Cb is abstract;cannot be instantiated...

Cb co =new Cb();


i've written it as a part of execution logic class....please look it once...
5 years ago
thank you julien coe .....i've changed "i" .....but still it is showing error like this

line no 53 error : Cb is abstract;cannot be instantiated...

Cb co =new Cb();


i've written it as a part of execution logic class....please look it once...
5 years ago
hi ......i'm very new to java...i'm learning core java for 2 months....i'm getting errors while devoloping a frame based checkbox application ....please look into that and help me to devolope that ...


here is the program

//CbDemo.java
import java.awt.*;
import java.awt.event.*;
class Cb extends Frame
{
Checkbox cb1;
Label l1,l2;
Cb()
{
setTitle("checkbox example");
setSize(200,200);
FlowLayout fl=new FlowLayout();
setLayout(fl);


// create the components

cb1=new Checkbox("java");
l1=new Label("select the course");
l2=new Label();

// add components to container

add(l1);add(cb1);add(l2);

// registration

Sathya so=new Sathya();
cb1.addItemListener(so);
setVisible(true);

}//cb ()

class Sathya implements ItemListener

{
public void ItemStateChanged(ItemEvent ie)
{
if(ie.getSource()==cb1)
{
if(cb1.getState())
{
l2.setText("your selected course:"+cb1.getLabel());
}
else
{
l2.setText("please select a course");
}
}//if
}//isc
}//sathya
}//cb
class CbDemo
{
public static void main (String []args)
{
Cb co=new Cb();
}
}






//it is showing that line no. 34 is an error ....

line no.34 : class Sathya implements ItemListener



Cb.Sathya is not abstract method and does not override abstract method ItemStateChanged(ItemEvent) in ItemListener

please let me know what is wrong in that .....thank you ..
5 years ago
hi ......i'm very new to java...i'm learning core java for 2 months....i'm getting errors while devoloping a frame based checkbox application ....please look into that and help me to devolope that ...sorry for my bad english ..


here is the program

//CbDemo.java



//it is showing that line no. 34 is an error ....

Cb.Sathya is not abstract method and does not override abstract method ItemStateChanged(ItemEvent) in ItemListener

please let me know what is wrong in that .....thank you ..

[Added code tags - see UseCodeTags for details]
5 years ago
welcome deepak .....thanks you for participating in this website for book promotion..
5 years ago