What do you want to save?
Add Code snippet
New code examples
-
Java 2021-11-10 22:41:14
matrix multiplication
import java.util.Arrays; import java.util.Scanner; public class Matrix { private static int counter =0; private static Scanner scanner = new Scanner(System.in); private int rawForArr1 , columnforarr1Andrawsforarr2, columnForArr2 =0; // p... Add solution -
TypeScript 2021-11-08 14:06:20
in another method display sum of elements in different arrays in c#
using System; public class funcexer5 { public static int Sum(int[] arr1) { int tot=0; for (int i = 0;i < arr1.Length; i++) tot += arr1[i]; return tot; } public static void Main() { int[] arr1... Add solution -
Java 2021-11-08 04:00:18
static methods vs instance methods
static or class method 1) A method that is declared as static is known as the static method 2) We don't need to create the objects to call the static methods 3) Non-static (instance) members cannot be accessed in static context (static method, static blo... Add solution -
Java 2021-11-07 14:18:16
Create a new ArrayList called courses1, add 5 courses to it and print it out.
import java.util.ArrayList; public class Course { private String courseName; private int noOfStudents; private String teacher; public static int instances = 0; private ArrayList<Student> studentList; //Getters public Stri... Add solution -
Java 2021-11-06 22:40:13
Static method in java
//Java Program to get the cube of a given number using the static method using static before a method or variable we can access it by not creating a instance of it.in the program we directly used student.cube(5) class Calculate{ static int cube(int... Add solution -
Other 2021-11-06 18:03:13
program code for counting the similarwrod in the sentences
public static int count(String word) { if (word == null || word.isEmpty()) { return 0; } int wordCount = 0; boolean isWord = false; int endOfLine = word.length() - 1; char[] characters = word.toCharArray(); for (int i... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5
+5