mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-25 05:22:39 +08:00
Refactor Code Style (#4151)
This commit is contained in:
@ -23,7 +23,7 @@ class BinaryToDecimal {
|
||||
*
|
||||
* @param args Command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.print("Binary number: ");
|
||||
System.out.println("Decimal equivalent:" + binaryToDecimal(sc.nextLong()));
|
||||
|
@ -14,7 +14,7 @@ public class BinaryToOctal {
|
||||
*
|
||||
* @param args Command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.println("Input the binary number: ");
|
||||
int b = sc.nextInt();
|
||||
|
@ -12,7 +12,7 @@ class DecimalToBinary {
|
||||
*
|
||||
* @param args Command Line Arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
conventionalConversion();
|
||||
bitwiseConversion();
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class HexToOct {
|
||||
*
|
||||
* @param args arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
String hexadecnum;
|
||||
int decnum, octalnum;
|
||||
Scanner scan = new Scanner(System.in);
|
||||
|
@ -17,7 +17,7 @@ public class HexaDecimalToDecimal {
|
||||
}
|
||||
|
||||
// Main method gets the hexadecimal input from user and converts it into Decimal output.
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
String hexa_Input;
|
||||
int dec_output;
|
||||
Scanner scan = new Scanner(System.in);
|
||||
|
@ -14,7 +14,7 @@ public class OctalToDecimal {
|
||||
*
|
||||
* @param args Command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.print("Octal Input: ");
|
||||
String inputOctal = sc.nextLine();
|
||||
|
@ -46,7 +46,7 @@ public class OctalToHexadecimal {
|
||||
return hex;
|
||||
}
|
||||
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
Scanner input = new Scanner(System.in);
|
||||
System.out.print("Enter the Octal number: ");
|
||||
// Take octal number as input from user in a string
|
||||
|
@ -14,7 +14,7 @@ public class TurkishToLatinConversion {
|
||||
*
|
||||
* @param args Command line arguments
|
||||
*/
|
||||
public static void main(String args[]) {
|
||||
public static void main(String[] args) {
|
||||
Scanner sc = new Scanner(System.in);
|
||||
System.out.println("Input the string: ");
|
||||
String b = sc.next();
|
||||
|
Reference in New Issue
Block a user