//creation of variable holds the Square Root of Sample Variable double rootResult = Math.sqrt(sampleVariable); —————Full Program—————— //Programmer:Akinwale Owi //Company:Dagba Computers //Program Purpose:How to print a Square Root…… Read more “Java #16: How to find the Square Root in Java”
Category: Java Programs
Java #15: How to Make a Constant Variable in Java
//final variable – usually in all caps final double CONSTANT_VARIABLE = 6; ——————Full Program—————— //Programmer:Akinwale Owi //Company:Dagba Computers //Program Purpose:Create A Constant Variable package dagba.samples; /** *…… Read more “Java #15: How to Make a Constant Variable in Java”
Java #14: How To Print The Date and Time
————-full source code————– //Programmer:Akinwale Owi //Program Purpose: How to Print the Current Date & Time package dagba.computer.samples; /** * * @author Akin */ //array imports import java.util.Date;…… Read more “Java #14: How To Print The Date and Time”
Java #13: How to Sort an Array Automatically
How to sort an array in java Arrays.sort(insertArrayName); Here’s the full source code of a program I created to print out an array before it is sorted…… Read more “Java #13: How to Sort an Array Automatically”
Java #12: How to make a Radio Button and ButtonGroup
//JRadio Button Creation Visible Name JRadioButton Dogs = new JRadioButton(“Dogs”); JRadioButton Cats = new JRadioButton(“Cats”); //Create ButtonGroup so only one button can get selected at a time…… Read more “Java #12: How to make a Radio Button and ButtonGroup”
Java #11: How to change the JFrame Background Color
//Changing the frame color frame.getContentPane().setBackground(Color.BLUE); Entire program //Programmer:Akinwale Owi //Program Purpose: How to Build A JFrame //Company:Dagba Computers //—————————————————— //package name package dagba.computers; //imports import java.awt.*; import…… Read more “Java #11: How to change the JFrame Background Color”
Java 10#: How to Make A JFrame
//Programmer:Akinwale Owi //Program Purpose: How to Build A JFrame //Company:Dagba Computers //—————————————————— //package name package dagba.computers; //imports import java.awt.*; import java.awt.event.*; import javax.swing.*; //class name public class…… Read more “Java 10#: How to Make A JFrame”
Java #9: How To Change A String From Lower Case to Upper Case
//Reading in the string preChange = wordReader.nextLine(); //Changing the string to upper afterChange = preChange.toUpperCase(); //Printing out the changed string System.out.println(“Nah Say it like this: “+afterChange+”!”); …… Read more “Java #9: How To Change A String From Lower Case to Upper Case”
Java #8: Average of User Inputted Numbers(Loop until user wants to quit)
//Programmer:Akinwale Owi //Program Purpose: Average, Loop Until User Enters A Negative //Company:Dagba Computers //—————————————————— //package name package dagba.computers; //imports import java.util.Scanner; //class name public class DagbaComputers {…… Read more “Java #8: Average of User Inputted Numbers(Loop until user wants to quit)”