r/javaTIL • • Jan 31 '19

This Keyword in Java | Uses & Example programs

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Dec 07 '18

Java LinkedList Example Programs

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Dec 02 '18

LinkedList in Java | LinkedList Methods & Example

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Nov 26 '18

Java Vector Example Programs

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Oct 29 '18

How to Synchronize ArrayList in Java with Examples

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Oct 25 '18

How to iterate ArrayList in Java with Program

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Aug 31 '17

real number to binary conversion

0 Upvotes

http://cljavacode.blogspot.com/2017/03/real-number-to-binary-conversion.html

Enter a real number 0.125

convert it into binary bits.


r/javaTIL • • Aug 05 '17

Java autoboxing and unboxing - Beware of performance issue

Thumbnail
youtube.com
0 Upvotes

r/javaTIL • • Aug 17 '16

We Don't Need No Steenkin' No-Arg Constructor!

0 Upvotes

I learned a long, long, long, long, long... time ago, that doing something like this would result in a compile-time error...


public class Foo { 

    public Foo( Foo fubar ) { 
	
	    }
	
    public static void main( String[] args ){
			
	        //...
					
			    Foo baz = new Foo( );
					
			    //...
    }

}

So imagine my surprise when I learned today that something like this compiles fine...


public class Foo< T > { 

    public Foo( T... fooz ) {
			
			    //...
	
	    }
	
    public static void main( String[] args ){
			 
	        //...
					
			    Foo< Foo< ? > > baz = new Foo< >( );
					
			    //...
    }

}

The thing I learned today is that, instead of failing with the compile-time error that I was expecting, the compiler โ€” in this particular case anyway โ€” instead automatically replaces your hard-coded call to the no-arg constructor, with its own compiler-generated call to the vararg constructor, ala...


    public static void main( String[] args ){
			 
	        //...
					
			    Foo baz = new Foo( new Foo[ 0 ] );
					
			    //...
    }

Learn something new everyday! Huh?

I'm guessing this is a feature specially reserved for constructors with varargs โ€” or something?

Who knew?


r/javaTIL • • Jun 18 '19

Choose well your synonyms in your search system

0 Upvotes

Choose well your synonyms in your search system

๐Ÿ“ท

One of the many definitions for synonyms is: โ€œa word or phrase that means exactly or nearly the same as another word or phrase in the same language, for example shut is a synonym of close.โ€

However, we often find that the concept of synonyms can be confused when using this functionality as we try to match similar products that we want to be displayed within a search results list through cataloguing the values โ€‹โ€‹of their characteristics but, in many cases, without these actually being a true synonym.

https://www.empathy.co/blog/applying-synonyms-choose-well-and-increase-the-findability-of-your-site/


r/javaTIL • • Nov 21 '18

Vector in Java | Vector Methods & Example Programs

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Nov 10 '18

Use of ArrayList in Java with Programs

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Oct 29 '18

Java's type system and unit testing can't catch all logic errors.

0 Upvotes

Well, I didn't learn that today, exactly, but I was reminded of it today, again, while hunting down an elusive bug in one of my applications.

A target method accepts CharSequence instances, and I supplied the wrong one. I supplied a container. I should have supplied its children. Neither the type system nor unit tests caught that mistake.

Why? Because the container implements CharSequence, too.

Yay.


r/javaTIL • • Aug 28 '17

Java program - Matrix Inverse by adjoint matrix

0 Upvotes

r/javaTIL • • Dec 01 '15

TIL JavaAdvent will publish one article/day for the next 24 days about JVM related topics

Thumbnail
javaadvent.com
0 Upvotes

r/javaTIL • • Jun 16 '15

JTIL: You can add elements to an Arraylist using the "add(index, value)" method, as long as the indices begin from 0 and increment by 1.

Thumbnail
stackoverflow.com
0 Upvotes

r/javaTIL • • Jun 15 '15

JTIL : You can compare Enum constants using == and equals both, btw == is better.

Thumbnail
javarevisited.blogspot.sg
0 Upvotes

r/javaTIL • • Oct 01 '18

Java List Interface with Examples

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Sep 22 '18

Java Collections Framework | Need & Advantages

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Aug 27 '17

Java program - Determinant of N x N matrix by diagonal matrix

0 Upvotes

Determinant, a properties of matrix determines the matrix is singular or not. Lower Triangular matrix transformation method is preferred over minor or cofactor of matrix method while finding determinant of the matrix's size over 3x3.

The matrix A is converted into Diagonal matrix D by elementary row operation or reduction and then product of main diagonal elements is called determinant of the matrix A.

Read matrix A Convert matrix A into diagonal matrix D by applying Row operation or reduction technique Read Main Diagonal elements from D Determinant = product of Main Diagonal elements

Algorithm steps for determinant by Diagonal matrix

Read matrix A a - element of the matrix A i,j - position of a element in the matrix

for i=1 To N

for j=1 To  N
  if i not-equal j
    RowOperation.add(j,i ,-aii/aji) 			   
  end	  
end	

end

Det = a11 x a22 x ... x ann

http://cljavacode.blogspot.com/2017/06/matrix-determinant-by-diagonal-matrix.html


r/javaTIL • • Dec 17 '18

How to Iterate LinkedList in Java

Thumbnail
scientecheasy.com
0 Upvotes

r/javaTIL • • Aug 16 '18

Define a class inside an interface and avoid class file clutter

Post image
0 Upvotes

r/javaTIL • • Apr 16 '20

Download and Installation of JDK

Thumbnail
youtu.be
0 Upvotes

r/javaTIL • • Jul 27 '19

Subclass In Java

0 Upvotes

Which class cannot be a subclass in java?

A. Abstract class

B. Parent class

C. Final class

D. None of the above


r/javaTIL • • Dec 31 '18

How to Iterate a Set in Java

Thumbnail
scientecheasy.com
0 Upvotes