मैं सूर्य जावा ट्यूटोरियल के माध्यम से कुछ पढ़ने कर रहा था, और मैं यह पृष्ठ यहाँ भर में आया था:यह जावा .execute() विधि कॉल का क्या अर्थ है?
: शीर्षक के अंतर्गत, "एप्लेट में धागे" मैं कोड के इस टुकड़े पाया
//Background task for loading images.
SwingWorker worker = (new SwingWorker<ImageIcon[], Object>() {
public ImageIcon[] doInBackground() {
final ImageIcon[] innerImgs = new ImageIcon[nimgs];
...//Load all the images...
return imgs;
}
public void done() {
//Remove the "Loading images" label.
animator.removeAll();
loopslot = -1;
try {
imgs = get();
} ...//Handle possible exceptions
}
}).execute();
}
सबसे पहले मैं नया हूं, इसलिए मुझे खेद है कि यह एक बेवकूफ सवाल है। हालांकि मैंने कभी ".excecute()" के बारे में नहीं सुना है। मुझे यह समझ में नहीं आता है, और मैं Google से इसके बारे में कुछ भी नहीं ढूंढ पा रहा हूं। मैं इसे यहाँ देखता हूं ... एक अज्ञात आंतरिक वर्ग? (कृपया मुझे सही करें) और यह छवियों में लोड करने के लिए धागा शुरू कर रहा है। मैंने सोचा कि रन() विधि को कॉल() शुरू करने के लिए कॉल के साथ बुलाया जाता है? कृपया इस भ्रम को दूर करने में मेरी मदद करें।
यहां ट्यूटोरियल है: http://docs.oracle.com/javase/tutorial/uiswing/concurrency/worker.html –
http://docs.oracle.com/javase/6/docs/api/javax/swing /SwingWorker.html; http://docs.oracle.com/javase/tutorial/uiswing/concurrency/ –