Saturday, 31 December 2022

New Year 2k23

New Year's Day: Now is the accepted time to make your regular annual good resolutions. Next week you can begin paving hell with them as usual." - Mark Twain


"I think in terms of the day's resolutions, not the year's." - Henry Moore


"We will open the book. Its pages are blank. We are going to put words on them ourselves. The book is called Opportunity and its first chapter is New Year's Day." - Edith Lovejoy Pierce


"Be always at war with your vices, at peace with your neighbors, and let each new year find you a better man." - Benjamin Franklin


"An optimist stays up until midnight to see the New Year in. A pessimist stays up to make sure the old year leaves." - Bill Vaughan 


"May the New Year bring you courage to break your resolutions early! My own plan is to swear off every kind of virtue, so that I triumph even when I fall!" - Aleister Crowley


"Wishing you a Happy New Year filled with health, wealth, love, and happiness."


"As we look forward to a new year, let's all try to be the best versions of ourselves. Happy New Year!"


"Here's to hoping that the New Year is filled with prosperity, happiness, and all of the things that are important to you."


"Wishing you a fantastic New Year filled with adventure, love, and success. Cheers to a new beginning!"


"May the coming year be filled with growth, prosperity, and all of the things that bring you joy. Happy New Year!"

"The best love is the kind that awakens the soul and makes us reach for more, that plants a fire in our hearts and brings peace to our minds. And that’s what you’ve given me. That’s what I’d hoped to give you forever." - Nicholas Sparks


"I love you not only for what you are, but for what I am when I am with you." - Roy Croft


"Love is not about how many days, weeks or months you've been together, it's all about how much you love each other every day." - Unknown


"I love you more than words can show, I think about you more than you could know." - Unknown


"As we enter a new year, my love for you will only grow stronger. Here's to many more happy years together."

chatGPT

 

INTRODUCTION:

ChatGPT is a natural language processing (NLP) model developed by OpenAI. It is a variant of the popular GPT (Generative Pre-training Transformer) model that is specifically designed for dialogue generation.

The ChatGPT model is trained on a large dataset of human-human conversations, allowing it to generate responses that are appropriate and coherent in a conversation. It can understand and generate a wide range of language, including slang and colloquialisms, and can handle a variety of topics and contexts.

One of the main benefits of ChatGPT is its ability to generate human-like responses quickly and efficiently. This makes it a useful tool for tasks such as customer service, language translation, and generating responses in chatbots.

To use ChatGPT, a user provides the model with a prompt or a conversation history, and the model generates a response based on this input. The user can then continue the conversation by providing additional prompts, and the model will generate appropriate responses.

While ChatGPT is able to generate human-like responses, it is important to note that it is a machine learning model and is not capable of independent thought or understanding. It can only generate responses based on the data it has been trained on and the input it receives.

Overall, ChatGPT is a powerful tool for generating human-like responses in natural language conversations, and has a wide range of potential applications in industries such as customer service, language translation, and chatbots.

  • ChatGPT is a highly flexible model that can be fine-tuned for specific tasks or domains. For example, it could be trained on a dataset of customer service conversations to generate responses for a chatbot that assists with technical support issues.
  • ChatGPT is able to handle a wide range of language styles and registers, including formal and informal language, as well as regional and cultural variations. This makes it well-suited for use in a global context.
  • One potential limitation of ChatGPT is that it is a machine learning model and can only generate responses based on the data it has been trained on. This means it may not be able to handle unexpected or novel situations, and may generate responses that are inappropriate or unrelated to the conversation.
  • In order to generate high-quality responses, ChatGPT requires a large dataset of human-human conversations to train on. The quality of the model's responses will depend on the quality and diversity of the training data.
  • ChatGPT is just one example of a NLP model that is designed for dialogue generation. 

 

History Of ChatGPT:

ChatGPT is a variant of the GPT (Generative Pre-training Transformer) model developed by OpenAI. GPT is a natural language processing (NLP) model that was first introduced in 2017. It is a transformer-based model that is trained using self-supervised learning on a large dataset of human-generated text.

GPT was the first large-scale transformer model and was highly successful in a number of NLP tasks, including language translation and language modeling. It was able to generate coherent and human-like text, and was able to achieve state-of-the-art results on a number of benchmarks.

In 2020, OpenAI released ChatGPT, a variant of GPT specifically designed for dialogue generation. ChatGPT was trained on a large dataset of human-human conversations and is able to generate responses that are appropriate and coherent in a conversation. It is able to understand and generate a wide range of language, including slang and colloquialisms, and can handle a variety of topics and contexts.

Since its release, ChatGPT has become a popular tool for generating human-like responses in natural language conversations, and has a wide range of potential applications in industries such as customer service, language translation, and chatbots.

 

ChatGPT

 

ADVANTAGES:

  1. Efficiency: ChatGPT is able to generate human-like responses quickly and efficiently, making it a useful tool for tasks such as customer service and chatbots.
  2. Flexibility: ChatGPT is highly flexible and can be fine-tuned for specific tasks or domains. This means it can be customized to suit the needs of different industries or applications.
  3. Wide range of language: ChatGPT is able to understand and generate a wide range of language, including slang and colloquialisms, and can handle a variety of topics and contexts.
  4. Human-like responses: ChatGPT is trained on a large dataset of human-human conversations, allowing it to generate responses that are appropriate and coherent in a conversation. This makes it a useful tool for tasks such as language translation.
  5. Easy to use: ChatGPT is relatively easy to use, as it can be provided with a prompt or conversation history and will generate a response based on this input. This makes it a user-friendly tool for a wide range of applications.
  6. Customization: ChatGPT can be fine-tuned to suit specific tasks or domains, which means it can be customized to meet the needs of different industries or applications. This makes it a highly versatile tool.
  7. Scalability: ChatGPT is a machine learning model, which means it can generate responses at a much faster rate than a human. This makes it a useful tool for tasks that require a high volume of responses, such as customer service or language translation.
  8. Consistency: ChatGPT is able to generate responses that are consistent with the input it receives. This means that it can maintain the tone and style of a conversation, even over multiple interactions.
  9. Continuous learning: ChatGPT is a machine learning model, which means it can continue to improve and learn over time as it is exposed to new data. This means it has the potential to become more accurate and efficient as it is used more.
  10. Cost-effective: ChatGPT can generate responses quickly and efficiently, which means it has the potential to be a cost-effective solution for tasks such as customer service or 

 

DISADVANTAGES:

  1. Limited understanding: ChatGPT is a machine learning model and is not capable of independent thought or understanding. It can only generate responses based on the data it has been trained on and the input it receives. This means it may not be able to handle unexpected or novel situations, and may generate responses that are inappropriate or unrelated to the conversation.
  2. Dependence on training data: The quality of ChatGPT's responses will depend on the quality and diversity of the training data it has been exposed to. If the training data is of poor quality or is not representative of the task or domain it is being used for, the model's responses may not be accurate or appropriate.
  3. Limited to tasks it is trained for: ChatGPT is a specialized model that is designed for a specific task - generating responses in natural language conversations. It may not be suitable for other tasks or domains.
  4. Ethical concerns: ChatGPT's ability to generate human-like responses raises ethical concerns about its potential use for tasks such as impersonating humans or misleading people. It is important to consider these issues and to ensure that ChatGPT is used responsibly.
  5. Bias in training data: Machine learning models can sometimes reflect the biases present in their training data. This means that ChatGPT may generate responses that are biased if the training data it has been exposed to is biased. It is important to ensure that the training data used to train ChatGPT is diverse and representative to minimize the risk of biased responses.

 

Uses in ChatGPT

ChatGPT is a natural language processing (NLP) model that is specifically designed for dialogue generation. It is able to generate human-like responses quickly and efficiently, making it a useful tool for a variety of applications. Some major uses of ChatGPT include:

  1. Customer service: ChatGPT can be used to assist with customer service tasks by generating responses to customer inquiries. It can handle a high volume of requests and can provide consistent, accurate responses.
  2. Language translation: ChatGPT can be used to translate conversations in real-time, allowing people who speak different languages to communicate with each other.
  3. Chatbots: ChatGPT can be used to power chatbots that assist with tasks such as answering customer questions or providing information.
  4. Social media: ChatGPT can be used to generate responses in social media conversations, such as responding to comments or messages on a page.
  5. Virtual assistants: ChatGPT can be used to power virtual assistants that assist with tasks such as setting reminders or answering questions.
  6. Language learning: ChatGPT can be used to assist with language learning by generating responses in a target language and providing feedback on pronunciation and grammar.

 

 

Friday, 23 December 2022

Challenges in Cloud Computing

 Challenges in Cloud Computing Some of the challenges in cloud computing are explained as follows :  Data Protection The data protection is the crucial element of security that warrants scrutiny. In cloud, as data is stored on remote data center and managed by third party vendors. So, there is a fear of losing confidential data. Therefore, various cryptographic techniques have to be implemented to protect the confidential data.

 Data Recovery and Availability In cloud, the user’s data is scattered across the multiple datacenters therefore the recovery of such data is very difficult as user never comes to know what is the exact location of their data and don’t know how to recover that data. The availability of the cloud services are highly associated with downtime of the services which is mentioned in the agreement called Service Level Agreement (SLA). Therefore, any compromise in SLA may leads increase in downtime with less availability and may harm your business productivity. 

 Regulatory and Compliance Restrictions Many of the countries have Compliance Restrictions and regulation on usage of Cloud services. Therefore, the Government regulations in such countries do not allow providers to share customer's personal information and other sensitive information to outside states or country. In order to meet such requirements, cloud providers need to setup a data center or a storage site exclusively within that country to comply with regulations.


Management Capabilities The involvement of multiple cloud providers for in house services may leads to difficulty in management.

Interoperability and Compatibility Issue The services hosted by the organizations should have freedom to migrate the services in or out of the cloud which is very difficult in public clouds. The compatibility issue comes when organization wants to change the service provider. Most of the public cloud provides vendor dependent APIs for access and they may have their own proprietary solutions which may not be compatible with other providers. The involvement of multiple cloud providers for in house services may leads to difficulty in management. 1.8.5 Interoperability and Compatibility Issue The services hosted by the organizations should have freedom to migrate the services in or out of the cloud which is very difficult in public clouds. The compatibility issue comes when organization wants to change the service provider. Most of the public cloud provides vendor dependent APIs for access and they may have their own proprietary solutions which may not be compatible with other providers.


Pros of Cloud computing 

  1.  Improved accessibility 
  2. Optimum Resource Utilization 
  3. Scalability and Speed 
  4. Minimizes licensing Cost of the Softwares 
  5. On-demand self-service 
  6. Broad network access 
  7. Resource pooling 
  8.  Rapid elasticity  

Introduction of Cloud computing

Definition : The Cloud computing is a model for enabling ubiquitous, convenient, on-demand network access to a shared pool of configurable computing resources (e.g., networks, servers, storage, applications, and services) that can be rapidly provisioned and released with minimal management effort or service providers interaction. 

Evolution of Cloud Computing The cloud computing becomes very popular in short span of time along with delivery of prominent and unique benefits which were never before. Therefore, it is important to understand evaluation of cloud computing. In this section we are going to understand the evolution of cloud computing with respect to hardware, internet, protocol, computing and processing technologies. 

Cloud Characteristics

  1. The NIST have defined five essential characteristics of cloud computing, which are 
    explained as follows. 
  2.  On-demand self-service : Each consumer can separately provisioned computing capabilities like server time, compute resources, network and storage, as needed 
  3. automatically without requiring human interaction with service provider.  Broad network access : The cloud capabilities are available over the network which are provisioned through a standardize network mechanisms that are used by 
  4. heterogeneous client’s platforms like thin or thick client, mobile phones, tablets, 
    laptops, and workstations. 

The distributed computing turns into a priority innovation in each IT association due to its unmistakable advantages over the current processing innovations.

 Distributed computing is exceptionally associated with other processing models like matrix registering, disseminated figuring and equal figuring which are combined with virtualization.

 It is planned to utilize circulated equipment and programming assets which are consolidated together to accomplish higher throughput at lower cost and can ready to take care of enormous scope calculation issues in lesser time. 

Fundamentally, Distributed computing has conglomeration off guring assets (like computer chip, recollections), organizing arrangements, stockpiling the board also, virtualization arrangements which are accessible on request, and conveyed monetarily.
Today, the utilization of distributed computing is huge in size since it has capacity to convey assets and administrations of any size whenever without stressing to arrangement anything at quicker rate with prudent expense.




 The administrations given by cloud follows a utility-based model which brings about cost for utilized benefits just and it doesn't need to arrangement or introduceany product or equipment for the utilization. It is a conveyed registering model through
which client can get to shared pool of assets, applications and administrations from anyplace whenever on any associated gadgets. Prior, associations were utilized to keep different servers in their server rooms, where they had separate document servers to store the reports, data set servers to store the records in data sets, exchange servers to run
the exchanges, trade servers to run the Email applications and web servers for web facilitating. 

The arrangement and forthright expense of each and every server was expensive as it has required very costly equipment, exorbitant server working frameworks and related application/data set programming, etc. 

A side from that it moreover needs extra labor to manage it like organization head to investigate the organization, Framework director to manage the equipment, Data set executives to manage the data sets, Web chairman to manage the sites, etc. Hence, capital cost related with the previous plans was unnecessarily high and was not sensible for little and medium-size associations. As such, to ask about on standard plans delivered distributed computing.


Advantages of Cloud Computing 

 There are many advantages of cloud computing, some of them are explained as follows. 

  Improved accessibility : The cloud computing provides efficient access to services and resources from anywhere, at any time, on any device. 

Optimum Resource Utilization : Servers, storage and network resources are better utilized in the cloud environment as they are shared among multiple users, thus it cut down the wastage of resources.

  Scalability and Speed : The cloud computing provides high scalability where capacity of hardware, software or network resources can be easily increased or decreased based on demand. In this, organizations do not have to invest money and time behind buying and setting up the hardware, software and other resources instead, they can easily scale up or scale down their resources or services running on cloud as per demand with the rapid speed of access.  

Minimizes licensing Cost of the Softwares : The remote delivery of software applications saves licensing cost such that users do not need to buy or renew expensive software licenses or programs. 

 Less personnel training : The users of cloud do not need any personal training to deploy or access the cloud services as the self-service portals of cloud used to have user friendly GUIs where anyone can work with cloud services easily. 

 Flexibility of work practices : Cloud computing provides freedom of access to their users such that the employees can work more flexibly in their work practices. The flexibility of access to the cloud data allow employees to work from home or on holiday through internet. 

Sharing of resources and costs : The cloud computing fulfills the requirement of users to access resources through a shared pool which can be scaled easily and rapidly to any size. The sharing of resources saves huge cost and makes efficient utilization of the infrastructure. 

 Minimize spending on technology infrastructure : As public cloud services are readily available, the Pay as you go or subscription based utility feature of cloud allows you to access the cloud services economically at cheaper rate. Therefore, it reduces the spending on in-house infrastructure. 

 Maintenance is easier : As cloud computing services are provided by service provider through internet, the maintenance of services is easier and managed by cloud service providers itself. 

 Less Capital Expenditure : There is no need to spend big money on hardware, software or licensing fees so capital expenditure is very less. 

 On-demand self-service : The cloud provides automated provisioning of services on demand through self-service websites called portals. 

Broad network access : The cloud services and resources are provided through a location independent broad network using standardized methods. 

 Resource pooling : The cloud service provider adds resources together into a resource pool through which user can fulfill their requirements and pool can be made easily available for multitenant environment. 

Measured services : The usage of cloud services can be easily measured using different measuring tools to generate a utility-based bill. Some of the tools can be used to generate a report of usage, audit and monitored services. 

 Rapid elasticity : The cloud services can be easily, elastically and rapidly provisioned and released through a self-service portal. Cloud Computing 1 - 9 Introduction TECHNICAL PUBLICATIONS® - An up thrust for knowledge 

Server Consolidation : The server consolidation in cloud computing uses an effective approach to maximize the resource utilization with minimizing the energy consumption in a cloud computing environment. The virtualization technology provides the feature of server consolidation in cloud computing. 

Multi-tenancy : A multi-tenancy in cloud computing architecture allows customers to share same computing resources in different environment. Each tenant's data is isolated and remains invisible to other tenants. It provides individualized space to the users for storing their projects and data.

Monday, 19 December 2022

C Programming Language Few Imp Oral Question's .

 1) Who is father of C programming language, and when was developed .

Dennis Ritchie in 1972 at bell laboratories in AT &T.

2)  What are the Feature's of C programming language . 

1) Simple

2) Portable 

3) Mid-Level

4)Fast Speed.

5)Structured 

3) What is mean by local variable 

A variable which is declared inside function or block is known as a local variable.

4) What is mean by global variable.

A variable which is declared outside function or block is known as a global variable.

5) What is the use of  function in C.

  • C functions are used to avoid the rewriting the same code again and again in our program.


6) What is the difference between call by value and call by reference 

  a) call by valueWhen a copy of the value is passed to the function, then the original value is not modified.
b) call by reference:  When a copy of the value is passed to the function, then the original value is modified.

7) What is the recursion in c :

When a function calls itself, and this process is known as recursion.

8) What is array in c : 

An Array is a group of similar types of elements. It has a contiguous memory location

9) What is pointer in c: 

9) What is static memory allocation: 

In case of static memory allocation, memory is allocated at compile time.

The static memory is allocated using static keyword . 


10) What is the dynamic memory allocation: 

dynamic  memory is allocated at runtime and memory can be increased while executing the program.

The malloc() or calloc() function is required to allocate the memory at the runtime.

11) What is malloc function and Syntax: 

 Malloc() 
The malloc() function is used to allocate the memory during the execution of the program.

Syntax:           
ptr= (cast-type*)malloc(byte-size);

11) What is calloc ()function and syntax: 

calloc() 
The calloc() is same as malloc() function, but the difference only is that it initializes the memory with zero value.
syntax: 
ptr=(cast-type*)calloc(n,element-size);

12) What is realloc ()function and syntax: 

realloc ()

The realloc() function is used to reallocate the memory to the  new size.
syntax:
ptr = realloc(ptr,newsize);

13) What is free() function and syntax: 

The free() function releases the memory allocated by either calloc() or malloc() function.
Syntax: 
free(ptr);


14) What is structure 

  1. The structure is a user-defined data type 
  2. Structure is collection of different data types in a single unit. 
  3. to declared using struct keyword 

15) What is union 

The union is a user-defined data type 
Union is collection of multiple data types in a single unit . 
In union, we can access only one variable at a time . 


Sunday, 18 December 2022

Myths about the programming language

 

"WHICH IS THE HIGHEST-PAYING PROGRAMMING LANGAUGE?"

So here is the list of top paying programming languages in 2023->

JAVA

           Why do you learn the java programming language?

  1. Easy to learn.
  2. offer large community .
  3. powerful development tool.
  4. platform Independent.
  5. versatile.

package: $75,000PA

USED BY:

Google

amazon

trivago

NETFLIX

Uber

ebay

linkedin

Python

                 why do you learn the python programming language?

  1. very versatile and offers multiple uses.
  2. one of the fastest growing language.
  3. high demand for the jobs
  4. easy to write ,read and learn  
  5. developers earn great money

package: $65,000PA

USED BY:

Dropbox

Quora

Google

NASA

facebook

amazon

javaScript

                  why do you learn javaScript?

  1. beginner friendly
  2. versatile
  3. developers are in demand
  4. exists outside of the internet
  5. career potential is the skyrocketing

package:$110,000PA

USED BY:

PayPal

Google

Uber

Microsoft

Netflix

ebay

kotlin

             why do you learn kotlin language?

  1. kotlin's code compiles into JavaScript to run on a web browser
  2. run-on-multi-platform
  3. concise
  4. better and modern version if java

package:$99,000PA

USED BY:

slack

Groww

Square

tinder

Dropbox

Swift

            why do you learn the Swift programming language?

  1. open-source
  2. fast and easy to learn
  3. built-in tools
  4. Apple is advancing Swift
  5. developers are high inn demand

package:$105,000PA

USED BY:

HubSpot

accenture

Square

trivago

Walmert

Rust

            why do you learn the rust programming language?

  1. used for the e=wed-development
  2. using package manager called Cargo
  3. gets combined and offers
  4. speed by vcontrolling lower-level language

package:$113,000

USED BY:

amazon

coursera

Figma

facebook

Microsoft

Java Collections - MAP

  A) HASHMAP

 Write a program using hashmap and store the student data , key is roll no 1,2,3, etc and value is name of student a,b,c and access  the name of roll -no = 2 .




import java.util.HashMap;

public class basichashmap {
    public static void main(String[ ] args) {
        HashMap<Integer, String> student = new HashMap<Integer,String >();
        student.put(1, "a");
        student.put(2, "b");
        student.put(3, "c");
        System.out.println(student.get(2));
    }
}



OUTPUT: 
b



Java collections - QUEUE

 Write a program using queue data structure , add the three aplhabates a,b,c and remove the b .



import java.util.*;

public class simplequeue {

    public static void main(String args[])
    {
        Queue<String> pq = new PriorityQueue<>();

        pq.add("a");
        pq.add("b");
        pq.add("c");
        System.out.println(pq);
        pq.remove("b");
        System.out.println(pq);

    }
}



outptut: 
[a, b, c]
[a, c]

Java Collections- SET

  Write a program using hashset to add the a,b,c alphabet and remove the c alphabet and  displayed the set and size of this set.



import java.util.HashSet;

public class simplehashset {
    public static void main(String[ ] args) {
        HashSet<String> set = new HashSet<String>();
        set.add("A");
        set.add("B");
        set.add("C");
        System.out.println(set);
        set.remove("A");
        System.out.println(set);

        System.out.println(set.size());
       
    }
}


OUTPUT: 
[A, B, C]
[B, C]
2


Java collections - List

 Java collections  

A ) List

 Write a program by using arraylist and Add the number 5,2,2,1,3 and remove 2 number index (1) and arranging the ascending order



import java.util.ArrayList;
import java.util.Collections;

public class simplelist {
    public static void main(String[ ] args) {
        ArrayList<Integer> number = new ArrayList<Integer>();
        number.add(5);
        number.add(2);
        number.add(2);
        number.add(1);
        number.add(3);

        System.out.println(number);
        number.remove(2);
        Collections.sort(number);
        System.out.println(number);
    }
}



OUTPUT: 

[5, 2, 2, 1, 3]

[1, 2, 3, 5]

Java program to illustrate and defining implements extending implements class.



public class avi implements Runnable
{
       public static void main(String[] args) {
        Thread guruThread1 = new Thread("avi");
        Thread guruThread2 = new Thread("avi");
        guruThread1.start();
        guruThread2.start();
        System.out.println("Thread names are following:");
        System.out.println(guruThread1.getName());
        System.out.println(guruThread2.getName());
    }
    @Override
    public void run() {
    }
}



      output : avi 

a        avi 













Multithreading 1) Java program to illustrate and defining thread by Extending thread class.

 Multithreading 


 Java program to illustrate and defining thread by  Extending thread class. 





class Test extends Thread
{
    public void run()
    {
        System.out.println("Run method executed by child Thread");
    }
    public static void main(String[] args)
    {
        Test t = new Test();
        t.start();
        System.out.println("Main method executed by main thread");
    }
}



OUTPUT: Main method executed by main thread
Run method executed by child Thread

Design an applet/application to create form using Text Field, Text Area, Button and Label. Label 1 name : Enter your name Lable 2 name : Adress Button : submit

 

Design an applet/application to create form using Text Field, Text Area, Button and Label.  

Label 1 name : Enter your name

Lable 2 name : Adress

Button : submit




package com.javaguides.javaswing.login;

import java.awt.*;

public class BasicAWT
{
 public static void main(String args[])
 {
  Frame f = new Frame();
  f.setSize(400,400);
  f.setVisible(true);
  f.setLayout(new FlowLayout() );
 
  Label l1 = new Label();
  l1.setText("Enter Your Name ");
   
  TextField tf = new TextField(" enter name");
 
  Label l2 = new Label("Address");
  TextArea ta = new TextArea("",3,40);
 
  Button b = new Button("Submit");
   
  f.add(l1); f.add(tf); f.add(l2); f.add(ta); f.add(b);
 }
}



output: 




Develop a program to select multiple languages known to user. 1) Marathi 2) Hindi 3) English

 


Develop a program to select multiple languages known to user.

1)Marathi

2)Hindi

English 


import java.awt.*;
class Lan {
    Lan() {
        Frame f = new Frame();

        Label l1 = new Label("Select known Languages");

        l1.setBounds(100, 50, 120, 80);
        f.add(l1);

        Checkbox c2 = new Checkbox("Hindi");
        c2.setBounds(100, 150, 50, 50);
        f.add(c2);
        Checkbox c3 = new Checkbox("English");
        c3.setBounds(100, 200, 80, 50);
        f.add(c3);
        Checkbox c4 = new Checkbox("marathi");
        c4.setBounds(100, 250, 80, 50);
        f.add(c4);

        f.setSize(500, 500);
        f.setLayout(null);
        f.setVisible(true);
    }

    public static void main(String ar[]) {
        new Lan();
    }
}


OUTPUT:


Write a program to create three buttons with caption ok , reset, and cancel;

 


SWING 


import java.awt.*;

class But {
    But() {
        Frame f = new Frame();
        Button b1 = new Button("Ok");
        b1.setBounds(100, 50, 50, 50);
        f.add(b1);
        Button b2 = new Button("Reset");
        b2.setBounds(100, 101, 50, 50);
        f.add(b2);
        Button b3 = new Button("Cancel");
        b3.setBounds(100, 150, 80, 50);
        f.add(b3);
        f.setSize(500, 500);
        f.setLayout(null);
        f.setVisible(true);
    }

    public static void main(String a[]) {
        new But();
    }
   }

OUTPUT:




GitHub Most Imp Command For Every Developer Learn:

 Top Command for GitHub:  1) git clone 2) git init and git status   3) git add file name  or git add .  4) git commit -m message  5) git rem...