What is the % operator?
Answers were Sorted based on User's Feedback
Answer / ravikiran(aptech mumbai)
% is the modulus operator which will results in giving the
remainder of two numbers who stays as operands
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / mohammed salim
% is a modulus operator..And it returns the remainder of
the division operation.
| Is This Answer Correct ? | 3 Yes | 1 No |
Write a program to solve producer consumer problem in java?
Say you want to store the information about a number of pets in an array. Typical information that you could store for each pet (where relevant) would be • Breed of animal • Animal's name • Its birth date • Its sex • Whether it has been sterilised or not • When it is due for its next inoculation • When it last had its wings clipped For each type of pet (eg. dog, cat or bird) you would typically define a class to hold the relevant data. Note: You do not need to implement these classes. Just answer the following questions. 3.1.1 What would be the advantage of creating a superclass (eg. Pet) and declaring an array of Pet objects over simply using an array of Objects, storing each of the instances of the different pet classes (eg. Dog, Cat or Bird) in it? 3.1.2 Would you define Pet as a class or as an interface? Why? (2) (2)
How does enum work in java?
what is synchronization
Can we extend immutable class?
how to execute main()
What language is java written?
What is final keyword in java? Give an example.
What access modifiers can be used for variables?
What is a Transient Object?
0 Answers InfoAxon Technologies,
What is wrapper class example?
hi to all,i have a question on static block. i saved below as test.java class test extends a { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p as static test static but if i change base class as test class then class test { static { System.out.println("test static"); } public static void main(String []dfs) { } } class a extends test { static { System.out.println("a static"); } public static void main(String []asdf) { } } o/p test static explain me why "a static" wasn't print in second code when it is in derived class