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 Laptop { | |
| String brand; | |
| int price; | |
| public Laptop(String brand,int price) { | |
| // TODO Auto-generated constructor stub | |
| this.brand=brand; | |
| this.price=price; | |
| } | |
| public static void main(String[] args) { |
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 TwoDArray { | |
| public static void main(String[] args) { | |
| TwoDArray twoD= new TwoDArray(); | |
| //twoD.twoDimension(); | |
| //twoD.arrayAddition(); | |
| //twoD.arrayMultiplication(); | |
| twoD.addingValuesinArray(); | |
| private void addingValuesinArray() { | |
| int[][]a = {{5,10,15},{1,2,3},{2,4,6}}; | |
| int[][]b = {{1,2,3},{2,4,6},{7,8,9}}; |
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
| package twoDimensionalArray; | |
| import java.util.Scanner; | |
| public class TwoDArray { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| TwoDArray twoD= new TwoDArray(); | |
| twoD.arrayAddition(); | |
| } | |
| public void arrayAddition() | |
| { |
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
| package twoDimensionalArray; | |
| import java.util.Scanner; | |
| public class TwoDArray { | |
| public static void main(String[] args) { | |
| TwoDArray twoD= new TwoDArray(); | |
| twoD.arrayMultiplication(); | |
| } | |
| private void arrayMultiplication() { | |
| int[][] a = {{2,4,6},{1,2,3},{3,6,9}}; | |
| int[][] b = {{1,2,3},{2,4,6},{6,7,8}}; |
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
| package twoDimensionalArray; | |
| public class ThreeDArray { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| ThreeDArray user = new ThreeDArray(); | |
| user.ThreeD(); | |
| } |
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
| package twoDimensionalArray; | |
| import java.util.Scanner; | |
| public class TwoDArray { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| TwoDArray twoD= new TwoDArray(); |
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
| package patternPrograms; | |
| public class PatternA { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| PatternA user= new PatternA();public void pattern32() | |
| { | |
| int i=2; | |
| String a = "*"; |
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
| package sareeWeaving; | |
| import java.awt.*; | |
| import javax.swing.JFrame; | |
| public class SareeDesign extends Canvas{ | |
| public static void main(String [] args) | |
| { | |
| SareeDesign designOne=new SareeDesign(); |
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
| package patternPrograms; | |
| public class PatternA { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| PatternA user= new PatternA(); | |
| //user.pattern(); | |
| //user.pattern1(); | |
| //user.pattern2(); |
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
| package arrayBasics; | |
| import java.util.Scanner; | |
| public class ArrayBasics { | |
| public static void main(String[] args) { | |
| // TODO Auto-generated method stub | |
| ArrayBasics user = new ArrayBasics(); |