DNA project

I am working on the DNA sequencing project, and I reached a problem that I cannot resolve.

import java.util.ArrayList;
public class DNA{
// DNA Sequencing
  public static void main(String[] args){
    ArrayList<String> dnaSamples = new ArrayList<String>();
    dnaSamples.add("ATGCGATACGCTTGA");
    dnaSamples.add("ATGCGATACGTGA");
    dnaSamples.add("ATTAATATGTACTGA");
    String dna;
    int length;
    for(String sample : dnaSamples){
      dna = sample;
      length = dna.length();
      if(length % 3 = 0){
        if(sample.substring(0, 3) = "ATG"){
          if(sample.substring(length - 3) = "TGA"){
            System.out.println("Conditions satisfied");
          }
        }
      }else{
        System.out.println("Invalid DNA Sequence!");
      }
    }
    
  }
}

Here is the error:

DNA.java:14: error: unexpected type
      if(length % 3 = 0){
                ^
  required: variable
  found:    value
DNA.java:15: error: unexpected type
        if(sample.substring(0, 3) = "ATG"){
                           ^
  required: variable
  found:    value
DNA.java:16: error: unexpected type
          if(sample.substring(length - 3) = "TGA"){
                             ^
  required: variable
  found:    value
3 errors

Can someone help??

if (x == y) is the java norm (and many other programming languages too). Note you are writing if (x=y)

Now that is fixed, only the result of the third item of the Arraylist is getting printed. This is the result of running the program.
Sample 1 is an Invalid DNA Sequence!
This is the only output.

This is the code:

import java.util.ArrayList;
public class DNA{
// DNA Sequencing
  public static void main(String[] args){
    ArrayList<String> dnaSamples = new ArrayList<String>();
    dnaSamples.add("ATGCGATACGCTTGA");
    dnaSamples.add("ATGCGATACGTGA");
    dnaSamples.add("ATTAATATGTACTGA");
    String dna;
    int length;
    for(String sample : dnaSamples){
      dna = sample;
      length = dna.length();
      if(length % 3 == 0){
        if(sample.substring(0, 3) == "ATG"){
          if(sample.substring(length - 3) == "TGA"){
            System.out.println("Sample " + dnaSamples.indexOf(sample) + " Conditions satisfied");
          }
        }
      }else{
        System.out.println("Sample " + dnaSamples.indexOf(sample) + " is an Invalid DNA Sequence!");
      }
    }
    
  }
}