What is the output of this program? (or, can it be compiled)?


(i)Java AWT (Abstract Window Toolkit)



Download 1,04 Mb.
bet3/4
Sana22.06.2021
Hajmi1,04 Mb.
#73073
1   2   3   4
Bog'liq
BasicJavaTask5 homework

(i)Java AWT (Abstract Window Toolkit) is an API to develop GUI or window-based applications in java.
Java AWT components are platform-dependent i.e. components are displayed according to the view of operating system. AWT is heavyweight i.e. its components are using the resources of OS.
The java.awt package provides classes for AWT API such as Text Field, Label, Text Area, Radio Button, Checkbox, Choice, List etc.
(ii) Java Swing is used to create window-based applications. It is built on the top of AWT (Abstract Windowing Toolkit) API and entirely written in java.

Unlike AWT, Java Swing provides platform-independent and lightweight components.

The javax.swing package provides classes for java swing API such as JButton, JTextField, JTextArea, JRadioButton, JCheckbox, JMenu, JColorChooser etc.


(iii) Java FX: JavaFX is a Java library that is used to develop Desktop applications as well as Rich Internet Applications (RIA). The applications built in JavaFX, can run on multiple platforms including Web, Mobile and Desktops. JavaFX is intended to replace swing in Java applications as a GUI framework. However, It provides more functionalities than swing. Like Swing, JavaFX also provides its own components and doesn't depend upon the operating system. It is lightweight and hardware accelerated. It supports various operating systems including Windows, Linux and Mac OS.





  1. Complete this Fibonacci code.

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

for (int i = 0; i < 5; i++) {

int result = fiboRekursif(i);

System.out.print(result + " ");

}

}
public static Integer fiboRekursif(int n) {



………….

return ……….;

}

}
Ans: The complete code is shown below:






  1. Explain input and output file in Java and how to handle it!

Ans:

It is used to perform read and write operations in file permanently. Java uses streams to perform these tasks. Java I/O stream is also called File Handling, or File I/O. It is available in java.io package.

  • Java.io package provides classes for system input and output through files, network streams, memory buffers, etc.

  • Some input-output stream will be initialized automatically by the JVM and these streams are available in System class as inout, and err variable.
1   2   3   4




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish