Java | JSP | JSF Answers

Questions: 4 418

Answers by our Experts: 3 943

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

create an example that demonstrates proper utilization of a callback
Provide an example of a case utilizing polymorphism. Explain how your example benefits from polymorphism.
I've a JPanel and draw shapes on it out of paintComponent method, with panel.getGraphics()
the problem is my drawing disappear. i must click on them ro appear, and sometimes it doesn't work. also, when i minimize and then maximize the frame, the shapes disappear again.
i tried using repaint() method, it didn't work too.
I also have problem moving a drawn shape. i used this http://goo.gl/KIFDd sample and changed it a little; it doesn't work for polygons at all!

tnx for the help :)
import java.io.*;
import java.util.Scanner;


class userinput {
public static void main(String args[])

throws IOException
{
Scanner s=new Scanner(System.in);
String[]a=new String[4];
System.out.println("Enter 'STOP' to quit.");
for(int i=0;i<4;i++)
{
System.out.println(i+1+".Enter your input:");
String temp=s.nextLine();
a[i]=temp;
}

{

Scanner in = new Scanner(System.in);
String str[] = new String[4];

System.out.println("Enter 'STOP' to quit.");
for(int i=0; i<4; i++) {
str[i] = in.next();
if(str[i].equals("stop")) break;
System.out.println(str[i]);
System.out.println(a[i]);
}
System.out.println("**************");
System.out.println(" RESULT ");
System.out.println("**************");


for(int i=0;i<4;i++)
{
for(int j=0;j<4;j++)
{
String temp=a[i];
String tempB=a[j];
if(temp.compareTo(tempB)<0)
{
a[i]=tempB;
a[j]=temp;
}
}
}

for(int i=0;i<4;i++)
{
System.out.println(a[i]);
Your task is to create a JAVA program that will accept as many inputs as the user desires until the user enters “STOP”.

The program should then alphabetize the inputs and display the result. No external sorting classes are allowed.
Using prepared statements we are storing a record to table. one of the column type is CLOB which we get from message queue. But while storing it is showing the following exception

enlist: caught Exception

Listening to the message queue us by JMS MDB Listener
Using prepared statements we are storing a record to table. one of the column type is CLOB which we get from message queue. But while storing it is showing the following exception

enlist: caught Exception
Java programming this application need to have these factors and I am confused how to code them Help?


A salesperson will continue to earn a fixed salary of $55,000. The current sales target for every salesperson is $165,000.
The sales incentive will only start when 75% of the sales target is met. The current commission is 14% of total sales.
If a salesperson exceeds the sales target, the commission will increase based on an acceleration factor. The acceleration factor is 1.8.
The application should ask the user to enter annual sales, and it should display the total annual compensation.
Your program should use a class method to compute the calculated compensation. The method should take one parameter for the total sales, and the method should access the salary, sales target, sales incentive and acceleration factor from the class variables. The method should be non static, and be used as part of an object.The application should also display a table of potential total annual compensation that the salesperson could have earned, in $5000 increments above the salesperson’s annual sales, until it reaches 50% above the salesperson’s annual sales. The source code must demonstrate the use of conditional and looping structures.The application should have at least one class, in addition to the application’s controlling class.
Write a complete program in Java based on the following statement:
In the College of Computer Science and Information System, forty students were asked to rate the quality
of teaching of his Course Instructor in the class room environment on a scale of 1 to 10 (1 means
minimum standard of teaching and 10 means excellent standard of teaching). Summarize the number of
response of each type (i.e., 1 to 10). Count the number of occurrence of each response. Your program
should make rating on the frequency of response.
Create a java JCombobox component which on clicked shows a new frame with JTable (muclitcolumn) and a search field and the selected item is returned back to JCombobox.
LATEST TUTORIALS
APPROVED BY CLIENTS