• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

getting zelo value of varibales.

 
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,

This is my code.My problem is that i have three variables which i declare at the class level.
i.e int staticAssProg, int staticSrPrg , int staticProgrammer ;
at line this total= staticSrPrg*SP+ staticAssProg*AP+ staticProgrammer*P;
i am getting zero value of these variables.

Please tell me how to solve this.

Below is my java code





 
Sheriff
Posts: 22818
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Does your output indicate that these values are changed? If not, what is the value of workorder.getCategory()?
Does your output indicate that SP, AP and P are changed?
 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi,

The value of workorder.getCategory() is coming i.e some times it show Ass.Programmer ,Programmer and Sr.Programmer
as depend upon the category.
My probelm is that
the values of these staticAssProg, staticSrPrg , staticProgrammer . is coming zero
in the function
public String issueWork()
{
total= staticSrPrg*SP+ staticAssProg*AP+ staticProgrammer*P;
}
and it making my total is zero.
.
Please help me.
 
Ranch Hand
Posts: 194
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


Is that 'double semi-colon' syntax error causing your problem?
 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No this double symbol not creating any problem.
.
 
Rob Spoor
Sheriff
Posts: 22818
132
Eclipse IDE Spring Chrome Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No it isn't. Exttra semicolons can cause problems directly after the start of an if, while or for statement, but not directly after another semicolon.
 
pankaj semwal
Ranch Hand
Posts: 303
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
Same problem is coming even i remove the semi colon.

Thanks
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic