This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HelloWorldJava { | |
public static void main(String[] args) { | |
System.out.println("Hello World Java"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Computer { // Creating class Computer | |
int powerSupply; // fields | |
int processor; | |
int videoCard; | |
int primaryStorageRam; | |
int secondaryStorageHdd; | |
int motherBoard; | |
int water; // water coolled processor and video card | |
int turnOnThePower(int powerSupply, int motherBoard) { // methods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Computer { // Creating class Computer | |
int powerSupply; // fields | |
float processor; | |
int videoCard; | |
int primaryStorageRam; | |
int secondaryStorageHdd; | |
String motherBoard; | |
float water; // water coolled processor and video card | |
public Computer(int powerSupply, float processor, int videoCard, int primaryStorageRam, int secondaryStorageHdd, String motherBoard, float water) { // constructor |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Computer { // Creating class Computer | |
private int powerSupply; // fields | |
private float processor; | |
private int videoCard; | |
private String motherBoard; | |
/* getter and setter methods are evil | |
BEGIN powerSupply */ | |
public int getPowerSupply() { | |
return powerSupply; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Computer implements java.io.Serializable { // Creating class Computer | |
private int powerSupply; // fields | |
private float processor; | |
private int videoCard; | |
private String motherBoard; | |
public Computer() { // default constructor | |
} | |
/* getter and setter methods |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calculator { | |
private int a = 4; | |
private int b = 5; | |
public int getSum(int a, int b) { | |
return a + b; | |
} | |
public void getResult() { | |
System.out.println("text"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calculator { | |
private int a = 4; | |
private int b = 5; | |
public static void main(String[] args) { | |
getResult("more text"); | |
} | |
public int getSum(int a, int b) { | |
return a + b; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Calculator { | |
private int firstNumber; | |
private int secondNumber; | |
private int resultValue; | |
public Calculator() { // Constructor | |
firstNumber = 10; | |
secondNumber = 5; | |
resultValue = getSum(); | |
printResult(resultValue); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Calculator { | |
private int firstNumber; | |
private int secondNumber; | |
private int resultValue; | |
private double wowSoSquare; | |
private double numberBeforeSquareRootExtraction; | |
private double squareRootCalcResult; | |
private double angleBeforeSineCalc; | |
private double sineCalcResult; |
OlderNewer